Click here to Skip to main content
15,885,914 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
Member 133016798-Jan-21 8:44
Member 133016798-Jan-21 8:44 
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 
Quote:
This looks like something I need to know, but I've spent a lot more than 2m and can't find it.

ISO 4217 is an obvious place to start but nothing there.

Could you provide a link please. Or a search term that would get me there.

I do have an app that makes use of 2 (at the moment) currencies - and I'm using FP.

TIA.


Off the top of my head try checking the ISO8583 data elements. All links in the chain of authorisation and settlements are done in some variant of the ISO8583 data elements (which, IIRC, are fixed-numeric of 12 or 14 digits for any field holding an amount).

This includes the acquirer PoS/terminal database, the merchant's stock database, the switches' message queues, the bank's transactional/rely system and storage and the issuer's database. They all religiously follow that.

The reason that using FP for currency and/or money values is considered a bug is due to the inaccuracy of FP (whether 64/80 bits): depending on the implementation, "0 != -0", "NaN != NaN", etc; equality comparisons cannot be made on FP calculations. For example, guess what the following program prints out (using IEEE754 implementation):

int main (void)
{
   float a = 0.1;
   float b = 0.2;
   float c = a + b;
   if (c == 0.3) {
      printf ("FOO");
   } else {
      printf ("BAR");
   }
   return 0;
}


FP cannot be reliably compared for equality. The above program, rewritten in any language that uses IEEE 754 floats, will always print "BAR". In FP, adding an FP 0.1 to an FP 0.2 does not result in an FP 0.3 - it results in something quite close though, but you cannot compare for equality.

Your app really should use a fixed-numeric (also called fixed-point, fixed-decimal, decimal or numeric) datatype for storing money, because money is always divided (tax, etc) and converted to other currencies, and the imprecision of FP arithmetic means that it is always going to have small errors. When talking to a forex system using their API, you'll find that they don't do their representation of money using FP.

If you're using an OOP language a numeric class can be made (or download one of the free popular ones) so that you get error-free fixed-point arithmetic. If you're storing the values, store them as a numeric/decimal fixed-point type, because if you read in an FP value that you just wrote out to disk, and compare it with what you thought you wrote, you'd find that the equality comparison sometimes fails (just like in the above code sample).
GeneralRe: The Decline and Fall of Search Engines Pin
Frank Malcolm8-Jan-21 15:17
Frank Malcolm8-Jan-21 15:17 
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 

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.