Numeric Programming for Everybody (was Re: I had a thought ...)

Steven D. Majewski sdm7g at Virginia.EDU
Tue Jun 5 20:51:46 EDT 2001


> > How can the language
> > accommodate the differing needs of the learner and dilettante on the one
> > hand, and the specialists in various kinds of numeric programming on the
> > other?

On Tue, 5 Jun 2001, Neil Benn wrote:

> Or should it?  As a programmer interested in interfacing to serial devices
> over RS-232, I really don't care about the intricacies of floating point
> calculations.  If practically 2+2=4, then I'm fine with that.  I think in
> the majority of real world applications, in a pragmatic sense most people
> don't care of the intricacies of number representation as long as it works
> (which in 99.9999999% of cases - it does for a fixed, static
> implementation).  Leave that to the experts, it's not just learners who
> don't care about the floating point philosophies.
> 
>     For highly specialised programming requirements (e.g. mathematical work,
> advanced neural netoworking) then highly specialised tools should be used,
> obviously that's a personal opinion not a statement!  For everything else,
> just get it to work and work reliably.

I know of a lot of people who would call interfacing to serial devices
over RS-232  "specialised programming" ,  but who expect to get reliable
results from math routines because that's something that they've been
led to believe that computers can do perfectly. 

And, from the naive users point of view, floating point DOESN'T work
99.9999999% of the time ( or even 99% of the time ), and doing things
to ensure it works better, like:

	>>> 1.0 / 5.0
	0.20000000000000001

seems to produce more confusion. 

The best way to cater to both the beginner and the specialist is to
leave floating point entirely to the specialist. The problem is that,
because computers were originally designed for specialists, they 
happen to have been designed with fast specialized floating-point
hardware, and absolutely no specialized rational arithmetic hardware. 

-- Steve Majewski






More information about the Python-list mailing list