News for hackers. Stuff that matters.
Re:C++17 – better than you might think by pavlov on Thursday December 29, 2016 @07:33AM (#13276940)
After years of hyperinflation, Zimbabwe's currency was entirely discarded last year. The final exchange rate was 35 x 10^15 Zimbabwean dollars for one USD:

"Bank accounts with balances of up to 175 quadrillion Zimbabwean dollars will be paid $5. Those with balances above 175 quadrillion dollars will be paid at an exchange rate of $1 for 35 quadrillion Zimbabwean dollars.

"The highest – and last – banknote to be printed by the bank in 2008 was 100 trillion Zimbabwean dollars. It was not enough to ride a public bus to work for a week."

https://www.theguardian.com/world/2015/jun/12/zimbabwe-offer...

Re:C++17 – better than you might think by kabdib on Thursday December 29, 2016 @09:43AM (#13277476)
I guess you could move the decimal point a bit and just add zeroes on output for that particular currency. [Not serious, this is a strong argument for int128 for currency... wow]

Gas stations in the US had a similar problem in the 1970s; most pumps didn't go over 99 cents a gallon. Took a few years for things to be retrofitted.

Re:C++17 – better than you might think by geezerjay on Thursday December 29, 2016 @10:29AM (#13277761)
A better idea would be to use a surrogate currency, like a tera- or peta-Zimbabwean dollar, which had a exchange rate of about 1:10^12 or 1:10^15.

I'm sure no one dealing with zimbabwean currency would care for so many significant digits.

Re:C++17 – better than you might think by tcbawo on Thursday December 29, 2016 @12:08PM (#13278451)
A large swath of the finance industry (especially trading) is concerned with optimal speed, not outlier edge cases. They would rather ignore pathological cases like the Zimbabwean currency than sacrifice performance.
Re:C++17 – better than you might think by smitherfield on Thursday December 29, 2016 @10:58PM (#13282400)
There are more commonly-traded currencies, such as the Russian ruble and the old Brazilian cruzeiro, that have had hyperinflation in the recent past.

But you certainly could have a fast path for stable currencies that are very unlikely to hyperinflate (USD, EUR, GBP, JPY).

Re:C++17 – better than you might think by user5994461 on Thursday December 29, 2016 @02:03PM (#13279229)
Disagree with that. Overflows and rounding errors are not to be taken lightly.
Re:C++17 – better than you might think by tcbawo on Thursday December 29, 2016 @04:10PM (#13280158)
Of course overflow and rounding error must be accounted for in your data type. Exchanges have price boundaries, price quanta, or risk boundaries that would guide this decision. My point is that you would not rule out a data type for trading based on an obscure currency like the Zimbabwean dollar.