Post A Reply
my profile
|
directory
login
|
search
|
faq
|
forum home
»
Flare Sci-Fi Forums
»
Star Trek
»
Starships & Technology
»
The TNG Warp Speed Formula
» Post A Reply
Post A Reply
Login Name:
Password:
Message:
HTML is enabled.
UBB Code™ is enabled.
[QUOTE]Originally posted by Joshua Bell: [QB] Note that if all you want is an answer to the inverse function (calculate W for a given v), then if your function f where v=f(W) is monotonically increasing (i.e. if v increases, W increases and vice versa) you can save yourself a lot of thinking if you just use iteration like I do in the Convert-O-Matic page. To find v_target, let W_min := 0 and W_max := 10. Now compute W_mid = ( W_min + W_max ) / 2. Using your formula f, compute v = f(W_mid). If v less-than v_target, let W_max := W_mid, else let W_min := W_mid. Rinse and repeat a hundred times, and v will converge on v_target giving you W_mid as your result. Note that since you're dealing with floating point numbers, you should define an epsilon (smallest difference you care about) and stop when abs(W_max - W_min) less-than epsilon, otherwise you're just burning cycles - the function is probably not stable below that point. [/QB][/QUOTE]
Instant Graemlins
Instant UBB Code™
What is UBB Code™?
Options
Disable Graemlins in this post.
*** Click here to review this topic. ***
© 1999-2024 Charles Capps
Powered by UBB.classic™ 6.7.3