Post Reply 
Free42 with IEEE 754-2008 decimal floating-point -- interested in a sneak preview?
02-24-2014, 02:33 AM (This post was last modified: 02-24-2014 02:47 AM by Thomas Okken.)
Post: #3
RE: Free42 with IEEE 754-2008 decimal floating-point - interested in a sneak preview?
(02-24-2014 01:47 AM)Paul Dale Wrote:  Nice work. Just out of interest, what do you use for the mathematical functions?
I know you had you own implementations of many but I don't know how well they'd have come forward to the wider floats.


- Pauli

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 highest-precision format, decimal128.

The higher-level functionality, like complex numbers, matrices, numerical integration, and numerical root-finding, 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 floating-point, 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 drop-in 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
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Free42 with IEEE 754-2008 decimal floating-point - interested in a sneak preview? - Thomas Okken - 02-24-2014 02:33 AM



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