Difference between revisions of "ApCoCoA-1:Fn.ReduceModLn2"
From ApCoCoAWiki
m (Bot: Category moved) |
m (fixed links to namespace ApCoCoA) |
||
Line 25: | Line 25: | ||
<types></types> | <types></types> | ||
</types> | </types> | ||
− | <see>Fn.ReduceModPi</see> | + | <see>ApCoCoA-1:Fn.ReduceModPi|Fn.ReduceModPi</see> |
− | <see>Fn.SetAccuracy</see> | + | <see>ApCoCoA-1:Fn.SetAccuracy|Fn.SetAccuracy</see> |
− | <see>Fn.GetAccuracy</see> | + | <see>ApCoCoA-1:Fn.GetAccuracy|Fn.GetAccuracy</see> |
<key></key> | <key></key> | ||
<key>Fn.ReduceModLn2</key> | <key>Fn.ReduceModLn2</key> |
Revision as of 08:15, 7 October 2020
Fn.ReduceModLn2
Reduces a given value modulo the natural logarithm of 2.
Syntax
Fn.ReduceModLn2(Val:RAT,Acc:Int):LIST
Description
This function reduces Val modulo Ln(2) to the interval
[0, Ln(2)), thereby guaranteeing correctness of the result
up to the desired accuracy Acc.
@param Val The value to be reduced.
@param Acc The desired accuracy.
@return A pair [R, Q] such that Val = Ln(2)*Q + R where Q is an integer and R is between 0 and Ln(2) and rounded to accuracy Acc.
Example
Dec( Fn.ReduceModLn2(10^200, 300), 100); [0.6180561092210337097642318484686251333232148266475695585717410024884378860227783295022403476737844868, 144269504088896340735992468100189213742664595415298593413544940693110921918118507988552662289350634449699751830965254425559310168716835964272066215822347933627453736988471849363070138766353201553389431] -------------------------------
</types>