Click here to Skip to main content
15,914,416 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
kalberts9-Jul-18 11:40
kalberts9-Jul-18 11:40 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
harold aptroot9-Jul-18 7:52
harold aptroot9-Jul-18 7:52 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
PIEBALDconsult9-Jul-18 8:22
mvePIEBALDconsult9-Jul-18 8:22 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
kalberts9-Jul-18 11:41
kalberts9-Jul-18 11:41 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
Super Lloyd9-Jul-18 14:10
Super Lloyd9-Jul-18 14:10 
AnswerRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
John Stewien10-Jul-18 0:03
John Stewien10-Jul-18 0:03 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
gdemont10-Jul-18 2:20
gdemont10-Jul-18 2:20 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
kalberts10-Jul-18 4:12
kalberts10-Jul-18 4:12 
When we were CompSci students around 1980, ready-made packages were not readily available, so a group of us created an arbitrary precision arithmetic fortram package for a friend in theoretical physics:

This fellow was working on an analythical model to describe, at the micro level, what happens when two wave fronts collide head on. When applying this model in a simulation, even the Univac 1100 double precision 72 bit floating point causd discontinuities - more or less perfect square wave forms, which none of us really believed existed in the physical world, certainly not in liquids... So we gave him a library where we set up buffers for 200 decimal digits. (For character I/O, BCD was much better suited than a 600+ bits pure binary value - speed of calculation was not of any importance.)

Even with 600+ bits of precision, he experienced too large discontinuities. Then we realized that he was adding up elements of a series expansions from the head of the series, from the big towards the smaller elements. This lead us into a huge argument with him: As I said, he was in theoretical physics, and simply refused to accept that the order of adding together series elements would make a difference. We were several guys, over a period of many days, trying to explain, each in our own way, why "in theory, therory and practice are identical, but in practice they are not". Finally, he gave in and turned the addition around the other way. The waves came out so smooth that we silently suspected that the Univac 72 bits format would have been sufficient, if had just, from the very beginning, added the smallest elements first.

There was an intense discussion in academia around that time whether Computer Science is a science requiring its own scientists to do computer related jobs, or if every engineer, mathmatician or physicist should learn to handle a computer himself. I several times used this story to argue that scientists getting close to a computer must learn enough about them to avoid silly problems caused by poor understanding of how computers operate.
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
swampwiz10-Jul-18 4:47
swampwiz10-Jul-18 4:47 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
Kirk 1038982110-Jul-18 3:50
Kirk 1038982110-Jul-18 3:50 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
kalberts10-Jul-18 4:24
kalberts10-Jul-18 4:24 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
englebart10-Jul-18 4:03
professionalenglebart10-Jul-18 4:03 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
Bruce Patin10-Jul-18 4:16
Bruce Patin10-Jul-18 4:16 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
Daniel Wilianto10-Jul-18 16:40
Daniel Wilianto10-Jul-18 16:40 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
kalberts11-Jul-18 9:05
kalberts11-Jul-18 9:05 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
Vivi Chellappa11-Jul-18 14:00
professionalVivi Chellappa11-Jul-18 14:00 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
kalberts12-Jul-18 1:59
kalberts12-Jul-18 1:59 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
Vivi Chellappa12-Jul-18 23:54
professionalVivi Chellappa12-Jul-18 23:54 
GeneralRe: How hard would it be to have a Rational Number type, so that there would never be floating point errors? Pin
bjongejan18-Jul-18 0:18
bjongejan18-Jul-18 0:18 
GeneralHooray Pin
theoldfool9-Jul-18 5:04
professionaltheoldfool9-Jul-18 5:04 
GeneralRe: Hooray Pin
OriginalGriff9-Jul-18 5:11
mveOriginalGriff9-Jul-18 5:11 
GeneralRe: Hooray Pin
DRHuff9-Jul-18 5:27
DRHuff9-Jul-18 5:27 
GeneralRe: Hooray Pin
theoldfool9-Jul-18 5:33
professionaltheoldfool9-Jul-18 5:33 
GeneralRe: Hooray Pin
Bassam Abdul-Baki9-Jul-18 5:51
professionalBassam Abdul-Baki9-Jul-18 5:51 
GeneralRe: Hooray Pin
Mike Hankey9-Jul-18 6:05
mveMike Hankey9-Jul-18 6:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.