lncheck.frink

Download or view lncheck.frink in plain text format


use ArbitraryPrecision.frink

/** This tests your processor's built-in IEEE-754 floating-point math
    to see how bad it is for certain values of ln[x] around 1.
*/

setPrecision[100]
for i=1 to 17
{
   n = 1. + 10^-i
   a = ln[n]
   b = arbitraryLn[n]
   err = abs[a-b]/b
   println["$n\t$a\t" + formatSig[err,1,4]]
}


Download or view lncheck.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 20139 days, 7 hours, 10 minutes ago.