From: Tim Bradshaw on
On 2010-01-01 17:05:56 +0000, Chris Ridd <chrisridd(a)mac.com> said:

> Unless you're developing a mathematics package, perhaps?

Maths packages typically require either whatever a double gives you, or
a vast number (aka either a symbolic constant, or "as many as this
algorithm needs"). Most of the systems I've used, which have offered
any kind of "floating-point" representation at all, have allowed you to
say "I need this many places" (and obviously were not using machine
floating-point for this!).

From: Tim Bradshaw on
On 2010-01-02 22:58:49 +0000, Paul Floyd <root(a)127.0.0.1> said:

> Have you ever heard of calculus? If you have, then I hope that you are
> aware that not all differential equations have a formal solution.
> In order to solve them, numerical methods are required. Usually machine
> precision is adequate (and fast), but sometimes more precision is
> needed.

But where machine precision is not adequate, you won't be running into
the problem described in this thread, because you won't be using
machine floats.

From: Richard B. Gilbert on
Tim Bradshaw wrote:
> On 2010-01-01 17:05:56 +0000, Chris Ridd <chrisridd(a)mac.com> said:
>
>> Unless you're developing a mathematics package, perhaps?
>
> Maths packages typically require either whatever a double gives you, or
> a vast number (aka either a symbolic constant, or "as many as this
> algorithm needs"). Most of the systems I've used, which have offered
> any kind of "floating-point" representation at all, have allowed you to
> say "I need this many places" (and obviously were not using machine
> floating-point for this!).
>

It is, of course, possible to do floating point operations using
software emulation but most systems I've worked with did FP in hardware.
Typically you could have 32 bit or 64 bit FP with 24 or 56 bits of
precision. Any arbitrary precision is available in a software emulation
but it would be dog slow on most hardware.
From: David Kirkby on
On Jan 4, 11:46 pm, Tim Bradshaw <t...(a)tfeb.org> wrote:
> On 2010-01-02 22:58:49 +0000, Paul Floyd <r...(a)127.0.0.1> said:
>
> > Have you ever heard of calculus? If you have, then I hope that you are
> > aware that not all differential equations have a formal solution.
> > In order to solve them, numerical methods are required. Usually machine
> > precision is adequate (and fast), but sometimes more precision is
> > needed.
>
> But where machine precision is not adequate, you won't be running into
> the problem described in this thread, because you won't be using
> machine floats.

True, but if you develop mathematical software, you need to check it.
When you find something behaving differently on one platform to
another, one needs to investigate that.

On 64-bit machines, multi-precision arithmetic is about 4x as fast as
on 32-bits. A lot of the libraries for this uses assembly code to get
the best possible speed.

One of the problems is that in general it is impossible to know what
precision you need to use for intermediate calculations, even if you
know what precision you need for the result. It is often a lot higher
than what's needed for the final result.
From: Glenn on
If floating-point is important to your applications, you need to read
this paper ("What Every Computer Scientist Should Know About Floating-
Point Arithmetic"), reprinted from an old Computing Surveys tutorial:

http://dlc.sun.com/pdf/800-7895/800-7895.pdf
ftp://ftp.quitt.net/Outgoing/goldbergFollowup.pdf

The second copy has some additional material at the end.