Difference between revisions of "ApCoCoA-1:Fn.ReduceModLn2"
From ApCoCoAWiki
m (insert version info) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Version|1}} | ||
<command> | <command> | ||
<title>Fn.ReduceModLn2</title> | <title>Fn.ReduceModLn2</title> | ||
Line 25: | Line 26: | ||
<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> | ||
<key>elemfns.ReduceModLn2</key> | <key>elemfns.ReduceModLn2</key> | ||
<key>ReduceModLn2</key> | <key>ReduceModLn2</key> | ||
− | <wiki-category>Package_elemfns</wiki-category> | + | <wiki-category>ApCoCoA-1:Package_elemfns</wiki-category> |
</command> | </command> |
Latest revision as of 10:04, 7 October 2020
This article is about a function from ApCoCoA-1. |
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>