Difference between revisions of "ESM Math Library"
Jump to navigation
Jump to search
m
no edit summary
imported>Diarrhoe (Added stage 40 and 50 for natural logarithm and exponentiation) |
imported>Diarrhoe m |
||
|
set myResultAngle to f.fout</pre>
=== Stage 40:
Takes an antilogarithm a (float) and returns the exponent b (float) to the base e(=2.71828...):<br>
a=e^b --> b=LN(a)<br>
set f.fout to 0
set f.LN_n to 0
elseif f.fin1 > 4 || f.fin1 < 0.25
;change values for better (slower processing) or worse accuracy (faster processing)
;this configuration should provide an accuracy of at least 99.99%
;LN(x) = n * LN( nthRoot(x) )
set f.LN_n to (f.LN_n * 2)
set f.t11 to (f.t10*f.t1)
set f.fout to (1 + f.t1 + f.t2/2 + f.t3/6 + f.t4/24 + f.t5/120 + f.t6/720 + f.t7/5040 + f.t8/40320 + f.t9/362880 + f.t10/3628800 + f.t11/39916800) ;attend to write this in one line</pre>
Actually, more terms won't increase accuracy any more, because Oblivion can't handle higher values.
| |||