bah.mapm

BlitzMax Modules Forums/Brucey's Modules/bah.mapm

Fear not :-)

SuperStrict
Framework BaH.MAPM
Import BRL.StandardIO
Import BRL.Math

Local angle:TMAPM = New TMAPM.Create("45")

Local sine:TMAPM = New TMAPM
Local cosine:TMAPM = New TMAPM

angle.SinCos(sine, cosine, 32)

Print "Sine   = " + sine.ToString()
Print "Cosine = " + cosine.ToString()

Now produces this :
Sine   = 0.707106781186547524400844362104849
Cosine = 0.707106781186547524400844362104849

The problem was my internal RadToDeg and DegToRad multipliers were only 16 digits accurate. So, I've now made them 520 digit accurate which will improve the math to that precision if desired.

If you wanted to increase it further, you could recalc the two multipliers (they are Global variables) to the accuracy you desire.

Otherwise, MAPM should work with number up to 2^31 digits, although I don't have enough RAM to test that :-p