Free42 with IEEE 7542008 decimal floatingpoint  interested in a sneak preview?

02242014, 02:33 AM
(This post was last modified: 02242014 02:47 AM by Thomas Okken.)
Post: #3




RE: Free42 with IEEE 7542008 decimal floatingpoint  interested in a sneak preview?
(02242014 01:47 AM)Paul Dale Wrote: Nice work. Just out of interest, what do you use for the mathematical functions? The Intel library provides all the functions Free42 needs; it doesn't just have arithmetic and square root, but also trigonometrics, hyperbolics, logarithms, and gamma. The new code uses all of these wherever possible, using the highestprecision format, decimal128. The higherlevel functionality, like complex numbers, matrices, numerical integration, and numerical rootfinding, is still done using the same algorithms and code as before, but everything now uses the new library for the basic operations underneath. In Free42 1.4, the first release that supported decimal floatingpoint, I basically replaced all occurrences of the C/C++ "double" type with "phloat" (silly, I know), which, in the binary builds, is #defined as "double", and in the decimal builds, is #defined as "Phloat" (note the capital P), which in turn is a C++ class that implements all the necessary constructors, assignment operators, and other operators and friend functions, so that it can be used as a dropin replacement for plain "double". All the BCD20 stuff was abstracted away by the Phloat class, and the new Free42 code basically just has a new Phloat that uses the Intel library underneath. There have been some changes to the binary/decimal conversion and display code, but that's about it.  Thomas 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)