Wie kann ich potenzieren / How to multiply

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #80527 quote
    wurstbrot
    Participant
    Junior

    Hi,

    ich scheitere gerade am simplen potenzieren. Also zum Beispiel 5³ (5 hoch 3) oder 4 hoch 8.
    Kann mir jemand helfen?

    Hi,

    i try to multiply but i don’t know how. For example 5 to the power of 3 (5³) or 4 to the power of 8.
    Can anybody help?

    Thanks alot.

    #80652 quote
    Nicolas
    Keymaster
    Master

    Sie können es auf 2 verschiedene Arten programmieren (zuerst ist das harte und das längste mit Schleife):

    //4^3 example
    number=4
    pow=3
    
    result=0
    i=1
    while i<pow do
     if i=1 then
      result=number
     endif
     result=result*number
     i=i+1
    wend
    
    return result
    

    Der zweite ist:
    Ich habe eine mathematische Entsprechung gefunden, wenn die Prorealtime LOG-Funktion (im Handbuch als Napierian-Log bezeichnet) tatsächlich die gemeinsame LN-Funktion ist:
    y = x ^ p = e ^ (p * LN (x))
    Dies könnte dann wie folgt codiert werden: y = EXP (p * LOG (x)) Dies funktioniert gut.

    wurstbrot thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Wie kann ich potenzieren / How to multiply


ProBuilder Support

New Reply
Author
author-avatar
wurstbrot @wurstbrot Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
7 years, 4 months ago.

Topic Details
Forum: ProBuilder Support
Language: German
Started: 09/14/2018
Status: Active
Attachments: No files
Logo Logo
Loading...