Re: demonic numbers !

From: Rahul Jain (rjain_at_nyct.net)
Date: 02/06/05


Date: Sun, 06 Feb 2005 07:21:23 -0500


"Christophe Turle" <cturle@nospam.com> writes:

> Yes, i know it's not lisp code. And this is in fact my problem, why IN lisp,
> .1111 is read as a float ? yes, the spec is the spec. But for this point,
> imho the spec is not good.

As you've been told, this point was debated when the spec was being
drawn up, but making .1111 read as a rational would break too much
existing code.

> I can't satisfy myself thinking that in Lisp .1111 does not mean .1111 (from
> human readers point of view)

Humans don't read code. Computers read code. :)

> It's the same as telling you that in language Horrible1 HGF.FDS means .1111
> because internally the language uses compression algorithms so it is more
> efficient. Where is abstraction ?

No it's not. What do you mean by abstraction? The details of the FP
implementation are abstracted. It is allowed to use any base, number of
exponent and mantissa bits, existence of negative zero, NaN(s),
infinities, gradual under/overflow, etc. The last few can't be
determined directly via standard operators, but the others allow a
decent degree of adaptability of code to different FP implementations.

In any case, FP numbers are an important part of computing. More
important than rational numbers, and that's not likely to change in the
future. Too much of the computation done needs to be fast and is based
on approximate, heuristic algorithms or inputs.

-- 
Rahul Jain
rjain@nyct.net
Professional Software Developer, Amateur Quantum Mechanicist


Relevant Pages

  • Re: AIs on drugs
    ... pulse networks, or any asynchronous network. ... the discrete state machine is a wonderfully powerful abstraction we ... Most of how we work with computers ...
    (comp.ai.philosophy)
  • Re: XP Is Slow
    ... spec is that there is no hard and fast rule, but there is an optimum that ... You also have to realise that no two computers are the same, ... "If hard work were such a wonderful thing, surely the rich would have kept ... > Mike Hall wrote: ...
    (microsoft.public.windowsxp.general)
  • Re: Liquidation sales
    ... computers often a lot less as the software is generally removed so ... anyone buying has to stick operating systems on. ... you can probably buy a similar spec (memory and processor speed) for around ...
    (uk.rec.motorcycles)
  • Re: Another 1.500 Job Losses - Time And Tiny Computers Go Under !
    ... they're actually paying people to produce computers and IT projects for them, why do think they'd do any better laying down the spec for other people's kit? ... neglected to make a new version of Windows backwards compatible there's not much a computer manufacturer can do to remedy the situation. ...
    (uk.politics.misc)
  • Re: Universal grammar
    ... Humans do not have any problems switching or combining different contexts, ... working simultaneously on different levels of abstraction. ... Computers can't ...
    (sci.lang)