Skip to content

errorfree and nearly errorfree transformations for accurate arithmetic

License

Notifications You must be signed in to change notification settings

Jeffrey-Sarnoff/ErrorfreeArithmetic.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ErrorfreeArithmetic

errorfree transformations and other arithmetic mappings of like accuracy

                                                       Jeffrey Sarnoff © 2016-Mar-22 in New York City
                                                                         2016-Jun-25 at v"0.1.0"

Nomenclature

The name of each exported function begins with a thrice lettered acronym. This prefix classifies the accuracy of the evaluand into one of two sorts:

sortal                | prefix | acronym                        | semantics (!rigourous review needed!)      |
----------------------|--------|--------------------------------|------------------------------------------|
evaluates errorfree   |  eft   | `E`rror`F`ree `T`ransformation | RoundNearest using 24/53 extra bits        |
evaluates accurately  |  acc   | `ACC`urate rounding          | \|ans-ideal\|/ans <= 2 \* eps(ans)  |

Exports

  eftIncr, eftDecr, eftSqr,                   # 1 arg  
  accSqrt, accSqrtForSign, accInv,  
  eftAdd, eftSub, eftMul, accDiv,             # 2 args  
  eftAddGTE, eftSubGTE, accDivForSign,
  eftAddGTE, eftAddGTEas2, eftAdd, eftAddAs2, # 3 args  
  eftMul, eftMulAs3, eftMulAs2,           
  eftFMA, eftFMA, eftFMAas2, eftFMSas2,  
  eftAddGTE, eftAddGTEas3, eftAdd, eftAddAs3  # 4 args

Use

using ErrorfreeArithmetic

hiPart, loPart  =  eftAdd(   12345.0f0  , 0.12345f0       ) 
showall( (hiPart,loPart) ) # 12345.123f0, 0.00040312856f0

hiPart, loPart  =  eftAdd(   12345.0    , 0.12345         ) 
showall( (hiPart,loPart) ) # 12345.12345, 8.614775559578902e-13

loPart == Float64((big(12345.0)+big(0.12345)) - big(hiPart)) # true

###Notes

Most of tese functions will accept variables v that are a subtype of Real for which convert(Float64, v ) is defined
(The functions of four arguments presuppose uniformly typed built-in AbstractFloats).

About

errorfree and nearly errorfree transformations for accurate arithmetic

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages