Difference between revisions of "ApCoCoA-1:Fn.ReduceModPi"
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.ReduceModPi</title> | <title>Fn.ReduceModPi</title> | ||
Line 22: | Line 23: | ||
</example> | </example> | ||
</description> | </description> | ||
− | <see>Fn.ReduceModLn2</see> | + | <see>ApCoCoA-1:Fn.ReduceModLn2|Fn.ReduceModLn2</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>Fn.ReduceModPi</key> | <key>Fn.ReduceModPi</key> | ||
<key>elemfns.ReduceModPi</key> | <key>elemfns.ReduceModPi</key> | ||
<key>ReduceModPi</key> | <key>ReduceModPi</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.ReduceModPi
Reduces a given value modulo 2*pi to the interval between -pi and pi.
Syntax
Fn.ReduceModPi(Val:RAT,Acc:INT):RAT
Description
This function reduces Val modulo 2*pi to the interval
(-pi, pi) 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 Returns a pair [R, Q] such that Val = Q*2*pi + R where Q is an integer and R is between -pi and pi.
Example
Dec(Fn.ReduceModPi(10^20, 10), 20) ; [-0.7013521577, 15915494309189533577] -------------------------------