Click here to Skip to main content
15,884,472 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: The Decline and Fall of Search Engines Pin
W Balboos, GHB8-Jan-21 9:16
W Balboos, GHB8-Jan-21 9:16 
GeneralRe: The Decline and Fall of Search Engines Pin
Member 133016798-Jan-21 9:42
Member 133016798-Jan-21 9:42 
GeneralRe: The Decline and Fall of Search Engines Pin
W Balboos, GHB11-Jan-21 3:04
W Balboos, GHB11-Jan-21 3:04 
GeneralRe: The Decline and Fall of Search Engines Pin
Daniel Will9-Jan-21 4:30
Daniel Will9-Jan-21 4:30 
GeneralRe: The Decline and Fall of Search Engines Pin
W Balboos, GHB11-Jan-21 2:34
W Balboos, GHB11-Jan-21 2:34 
GeneralRe: The Decline and Fall of Search Engines Pin
Frank Malcolm8-Jan-21 10:40
Frank Malcolm8-Jan-21 10:40 
GeneralRe: The Decline and Fall of Search Engines Pin
Member 133016798-Jan-21 11:16
Member 133016798-Jan-21 11:16 
GeneralRe: The Decline and Fall of Search Engines Pin
Frank Malcolm8-Jan-21 15:17
Frank Malcolm8-Jan-21 15:17 
Thanks, now I see what point you were making. It's reasonably obvious that multiplication and division will usually require truncation or rounding but the addition and subtraction issue (as in your example above) might be less obvious to some.

My exchange rate provider supplies the conversion as a JSON string, to six decimal places. Any difference from rounding in this particular app is immaterial. A few hundred transactions in any month, with 20 or so different daily exchange rates. My client needs to know the local currency amount for each transaction, but only the total of all the foreign currency amounts.

I am using an OOP language, but probably not one that you use. Delphi (which uses IEEE 754) provides a floating-point function with an Epsilon parameter - the maximum amount by which 2 floating-point numbers can differ and still be considered the same value. I might write, in your example,
if SameValue (c, 0.3, 0.00001) then...
and it would print FOO.

Thanks for the ISO 8583 reference. It's long, and has many normative references - I haven't read it all Laugh | :laugh:
GeneralRe: The Decline and Fall of Search Engines Pin
Member 133016799-Jan-21 0:04
Member 133016799-Jan-21 0:04 
GeneralRe: The Decline and Fall of Search Engines Pin
W Balboos, GHB10-Jan-21 2:43
W Balboos, GHB10-Jan-21 2:43 
GeneralRe: The Decline and Fall of Search Engines Pin
StarNamer@work21-Jan-21 4:36
professionalStarNamer@work21-Jan-21 4:36 
GeneralRe: The Decline and Fall of Search Engines Pin
Member 132567508-Jan-21 5:25
Member 132567508-Jan-21 5:25 
GeneralRe: The Decline and Fall of Search Engines Pin
20212a7-Jan-21 1:46
20212a7-Jan-21 1:46 
GeneralRe: The Decline and Fall of Search Engines Pin
W Balboos, GHB7-Jan-21 1:49
W Balboos, GHB7-Jan-21 1:49 
GeneralRe: The Decline and Fall of Search Engines Pin
Daniel Pfeffer7-Jan-21 3:41
professionalDaniel Pfeffer7-Jan-21 3:41 
GeneralRe: The Decline and Fall of Search Engines Pin
qmartens8-Jan-21 19:45
qmartens8-Jan-21 19:45 
GeneralRe: The Decline and Fall of Search Engines Pin
qmartens8-Jan-21 19:45
qmartens8-Jan-21 19:45 
GeneralRe: The Decline and Fall of Search Engines Pin
Paul Kemner7-Jan-21 4:35
Paul Kemner7-Jan-21 4:35 
GeneralRe: The Decline and Fall of Search Engines Pin
dandy727-Jan-21 4:22
dandy727-Jan-21 4:22 
GeneralRe: The Decline and Fall of Search Engines Pin
W Balboos, GHB7-Jan-21 4:29
W Balboos, GHB7-Jan-21 4:29 
GeneralRe: The Decline and Fall of Search Engines Pin
dandy727-Jan-21 5:03
dandy727-Jan-21 5:03 
GeneralRe: The Decline and Fall of Search Engines Pin
Mike Winiberg7-Jan-21 22:15
professionalMike Winiberg7-Jan-21 22:15 
GeneralRe: The Decline and Fall of Search Engines Pin
Carl_Sharman7-Jan-21 22:34
Carl_Sharman7-Jan-21 22:34 
GeneralRe: The Decline and Fall of Search Engines Pin
W Balboos, GHB8-Jan-21 5:23
W Balboos, GHB8-Jan-21 5:23 
GeneralRe: The Decline and Fall of Search Engines Pin
Shmoken998-Jan-21 10:06
Shmoken998-Jan-21 10:06 

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.