Re: demonic problem descriptions

From: Kent M Pitman (pitman_at_nhplace.com)
Date: 02/06/05


Date: Sun, 06 Feb 2005 19:59:59 GMT


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

> "Christopher C. Stacy" <cstacy@news.dtpq.com> a écrit dans le message de
> news: uhdkpsir8.fsf@news.dtpq.com...
> > Can you show us some code in the other programming language(s)
> > to which you are referring in which numbers with a decimal point
> > do not indicate a floating point number?
>
> Perhaps some exists, but i don't know about. But it's not a sufficient
> reason why it should be like this. Reasons must be objective ones not
> 'follow others' ones.

Fair enough. Please just give an "objective" description of the term
"objective" and we'll be all set.

One might, for example, argue that objective and subjective differ
only in that the subjectivity in the former is embedded so
fundamentally in the design of the universe that it is no longer
subject to change. That is, certain numeric constants and
relationships may have at one point in the design of the Universe been
variables, but once other things were nailed down, they no longer
could be.

Floating point is very close to this in the computer world, given that
there is floating point hardware on nearly every machine, and decades of
history involving thousands, perhaps even millions, of programmers who
are familiar with the "meaning" of 0.11111 in computerese.

As such, I would take Chris's question as an attempt to be objective,
that is, to say that the existing mechanism and notation serves a nearly
ubiquitous aspect of both notation and implementation that transcends
programming languages and is not likely to change any time in the next
year or two, nor probably much longer. That's a good floating point
approximation to "objective" in my book...
 
> > By the way, what TV channel frequencies are you being handed
> > that are not conveniently represented by floating point?
>
> (rationalize 201.0053) ; in MHz
> => 37990/189
>
> It works with double float. But the point is : why MUST i care about float
> type EVEN if i'm not concerned with optimization ???

You don't have to at all. If you're not concerned about optimization,
you're free to write and advertise a BCD library with appropriate readers
and/or readmacros.

What you ARE obliged to do is to write code that is not there by default.
Lisp enables you to do many things, but one of the things you are not enabled
to do is to wish for things and have them come into existence without
any work.

Maybe you just want Scheme. In Scheme, they have an extra dimension
of notational terminology for numbers--exactness vs inexactness
(orthogonally to floating point vs integer, such that you can have
exact floats and inexact integers).



Relevant Pages

  • Re: demonic problem descriptions
    ... > a long time and in many programming languages. ... The notation convention dates ... It's not like floating point ... representations whose accuracy and range are appropriate for the problem ...
    (comp.lang.lisp)
  • Re: floating point calculations.
    ... programming. ... If the processor does not have a floating point instruction set, ... your floating point numbers (whatever notation you have chosen). ... addition is the slowest basic operation, ...
    (comp.arch.embedded)
  • Re: This calculation is just wrong / computer cant count!
    ... the path about floating point inaccuracy, but most of them can actually be educated about ... Therefore specific programming is required to cater for this. ... By analogy ALL numbers in the 17 decimal places take part in the math so 7 ... what tolerance is GT prepared to accept before black becomes grey or any ...
    (microsoft.public.vc.mfc)
  • Re: weird problem
    ... I already told you that the comparison between an integer and a float ... And now a question about something else: why do you use floating ... use then to copy a float into a char *1. ... binary representation doesn't resemble a string like "123.46343" ...
    (comp.lang.c)
  • Re: Safer of 2 methods for very long doc
    ... I use wrapped objects so seldom that I have to think about how I've handled that when I have used them, and I guess, as you say, I've moved the anchor. ... paragraph and the picture move to the next page. ... in Word the text does not flow from after a 'floating' ... >I'd appreciate knowing how you "float" a table, ...
    (microsoft.public.word.docmanagement)

Loading