<div dir="ltr">I'm trying to create a list of real numbers with a two-decimal interval, a la <div><br></div><div>> [1.0,1.01,1.02,...1.99,2.00]</div><div><br></div><div>however, I get the float approximation problem</div><div><br></div><div>[1.0,1.01,1.02,1.03,1.04,1.05,1.06,1.07,1.08,1.09,1.1,1.11,1.12,1.1300000000000001,1.1400000000000001,...</div><div><br></div><div>So I attempted to compensate with</div><div><br></div><div>import Data.Decimal<br>map (roundTo 2) [1.00,1.01..2.0]<br></div><div><br></div><div>I don't have to do it this way if there is another rounding function to correct the float overrun issue.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 17, 2021 at 2:43 PM Francesco Ariis <<a href="mailto:fa-ml@ariis.it">fa-ml@ariis.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Il 17 febbraio 2021 alle 14:17 Galaxy Being ha scritto:<br>
> How would I install it globally? I'm not using projects, I'm just at the<br>
> ghci REPL.<br>
<br>
Most likely<br>
<br>
cabal install --lib Decimal<br>
<br>
Check what Tom has said too —F<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div>