<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 4 April 2017 at 15:50, Joachim Durchholz <span dir="ltr"><<a href="mailto:jo@durchholz.org" target="_blank">jo@durchholz.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Am 04.04.2017 um 16:13 schrieb ALeX Kazik:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Leaving aside the legal aspects of this, what would be Haskell's equivalent<br>
of the BigDecimal format in Java (or Ruby)? Decimal (as used by hledger)?<br>
</blockquote>
<br>
Rational?<br>
</blockquote>
<br></span>
You'd be constantly be doing explicit calculations to get back to a denominator of 100. Plus you'd have to deal with those cases where the denominator is a divisor of 100, and you'd need explicit nonstandard conversion to strings.</blockquote><div><br></div><div><br></div><div>The same sort of fiddling-the-denominator problems also occur if you use `Decimal` - it's not normally useful to be able to represent things smaller than £0.01 (or whatever the smallest unit of your local currency is); I'd even go as far as to say it's useful to be able to be sure that you _can't_ represent such things (in the domain of basic accounting at least - more complex things may deal with smaller fractions of currency, so YMMV etc).</div><div><br></div><div>Cheers,</div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
Only members subscribed via the mailman list are allowed to post.</div></div></blockquote></div><br></div></div>