bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] pi in gawk


From: francky . leyn
Subject: Re: [bug-gawk] pi in gawk
Date: Wed, 15 Feb 2012 23:08:59 +0100 (CET)

Dear Nelson,

looking a bit further, I also need the constant

R2D = 180/PI

the multiplication factor to convert radians to degrees.

> Here is how to do it in Maple:
> 
> > Digits := 35:
> 
> > printf("%a.0 / %a.0\n", trunc(Pi * 2**51), 2**51):
> 7074237752028440.0 / 2251799813685248.0
> 
> > printf("%.35g\n", Pi - trunc(Pi * 2**51) / 2**51):
> 1.224646799147353177e-16

Could you adapt this sequence for R2D?

Best regards,

Francky



reply via email to

[Prev in Thread] Current Thread [Next in Thread]