Re: Conformance



Charlie Gordon wrote:
You mention double double elsethread: are they 128 floats as specified by IEEE ?

No, I use two 64 bit doubles as in the package of Bailey.
They give a precision of approx 30 decimal digits

Regarding 352 bit floats: where did you get specs for those ?

From S. Moshier, its cephes math library.
I rewrote all the basic stuff (the four operations) in
assembler (32 and 64 bit) and modified many routines
to achieve full 105 digit precision.
All the C library has been written in that precision.

How many bits of mantissa and exponent ?

#define _NQ_ 12
typedef struct qfloatstruct {
int sign;
int exponent;
unsigned int mantissa[_NQ_]; // 32 bit integers
}qfloat;


any padding involved ?
Yes

how much is sizeof(qfloat) ?
See above

Did you implement the full math.h library for those or just the basic operations ?

Full math.h

Can you use them as components of complex numbers ?
Yes
Is garbage collection necessary for them ?
NO
Do you have a syntax for constant literals ?

#include <qfloat.h>

// INPUT
qfloat s = 3.1415965358979323846264338327950288419Q;
// OUTPUT
printf("%110.104qf\n",s);

Do you then have a syntax for specifying syntax extensions for constant literals ?


This is a point that is still not yet in my proposal.

As in C++, you can do this NOW by doing

Mynewtype m = "3.141593.1415965358979323846264338327950288419";

because you overload the assignment operator:

Mynewtype operator=(Mynewtype &a,char *someString);

Note the reference operator.

This is not optimal, since you can't do this at the global level
(the same problem as in C++)

I am developing a new solution, where you can specify a function that
is called AT COMPILE TIME when the compiler finds an unknown number
type.

This is much more powerful, and would solve all problems associated with
initialization and simplification.

Note that simplifying expressions with this new types of numbers is NOT
possible in C++. This would be possible if the compiler can call a
simplification procedure, giving it some expression and compiling the
result.

What is very inetersting is that we can use the experience gained in
C++ to prroduce a compatible software but with added functionality.

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
.



Relevant Pages

  • Re: Conformance
    ... They give a precision of approx 30 decimal digits ... This only increases the precision, not the range, and there are tricky ... Does your compiler pad qfloats to 512 bits or do your refer to ... qfloat s = 3.1415965358979323846264338327950288419Q; ...
    (comp.std.c)
  • strange implementation of quad precision in Absoft
    ... The Absoft quadruple precision extension of their Fortran 95 compiler is ... They use two "standard" double ... precision numbers, say D1 and D2 with D1 having the most significant digits. ... The reason IS that D1 contains the first 16 decimal digits of the ...
    (comp.lang.fortran)
  • Re: Trouble with integer floating point conversion
    ... When compiling with gcc I don't use any optimisation options. ... The Intel compiler sets probably the precision of the machine ... The gcc compiler and other compilers like lcc-win set the precision ... jacob at jacob point remcomp point fr ...
    (comp.lang.c)
  • Calculating log gamma
    ... of Bernoulli numbers, and I can't get any better precision ... than 128-129 decimal digits. ... incresed precision to 132 bits, but I can't get to that precision ... jacob at jacob point remcomp point fr ...
    (sci.math.num-analysis)
  • Re: Multi precision floating point
    ... to go beyond single precision, ... A whole three minutes to advertise your compiler, jacob? ... jacob's compiler does indeed provide this feature. ... If, on the other hand, you want to write multiple-precision floating-point as a learning exercise, or you forsee ever needing to use your code on an implementation other than jacob's, or you simply want to keep the choice of switching vendors, then it is perfectly possible to write multiple-precision floating-point in Standard C. ...
    (comp.lang.c)