<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Cool, there is just what I need...<br>
<br>
Valeu Bruno Buss.<br>
<br>
Em 31/05/2010 18:09, Bruno Buss escreveu:
<blockquote
cite="mid:AANLkTilv_8lIwhSm7G9hGziuTuOpwRtDM9O1tRNodafB@mail.gmail.com"
type="cite">
<div>Tem o Math::BigFloat[1] também.</div>
<div><br>
</div>
<div>[1]<a moz-do-not-send="true"
href="http://search.cpan.org/%7Etels/Math-BigInt-1.89/lib/Math/BigFloat.pm">http://search.cpan.org/~tels/Math-BigInt-1.89/lib/Math/BigFloat.pm</a></div>
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
<br>
<div class="gmail_quote">2010/5/31 Alexei Znamensky <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:russoz@gmail.com">russoz@gmail.com</a>></span><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">tente
<div><br>
</div>
<div>POSIX::modf<br>
<br>
<div class="gmail_quote">
<div class="im">2010/5/31 <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:thiagoglauco@ticursos.net"
target="_blank">thiagoglauco@ticursos.net</a>></span><br>
</div>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Eu tenho o seguinte algoritmo para comparar números reais. Alguém tem
uma
<div>
<div class="h5"><br>
forma melhor, menor, mais legível ou um módulo?<br>
<br>
# sao_iguais(NUM1, NUM2, PRECISAO) : Retorna "true" se os valores reais<br>
forem #iguais dentro da precisão determinada.<br>
<br>
sub sao_iguais {<br>
my ($num1, $num2, $precisao) = @_;<br>
return sprintf("%.${precisao}f", $num1) eq sprintf("%.${precisao}f",
$num2);}<br>
_______________________________________________<br>
SaoPaulo-pm mailing list<br>
<a moz-do-not-send="true" href="mailto:SaoPaulo-pm@pm.org"
target="_blank">SaoPaulo-pm@pm.org</a><br>
<a moz-do-not-send="true"
href="http://mail.pm.org/mailman/listinfo/saopaulo-pm" target="_blank">http://mail.pm.org/mailman/listinfo/saopaulo-pm</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<div class="im"><br>
-- <br>
Alexei Znamensky [russoz_gmail_com] [<a moz-do-not-send="true"
href="http://russoz.wordpress.com" target="_blank">russoz.wordpress.com</a>]
[<a moz-do-not-send="true" href="http://www.flickr.com/photos/alexeiz"
target="_blank">www.flickr.com/photos/alexeiz</a>]<br>
"Though we live in trying times, we're the ones who have to try"<br>
</div>
</div>
<br>
_______________________________________________<br>
SaoPaulo-pm mailing list<br>
<a moz-do-not-send="true" href="mailto:SaoPaulo-pm@pm.org">SaoPaulo-pm@pm.org</a><br>
<a moz-do-not-send="true"
href="http://mail.pm.org/mailman/listinfo/saopaulo-pm" target="_blank">http://mail.pm.org/mailman/listinfo/saopaulo-pm</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Bruno C. Buss<br>
<a moz-do-not-send="true" href="http://brunobuss.wordpress.com/">http://brunobuss.wordpress.com/</a><br>
<a moz-do-not-send="true" href="http://www.dcc.ufrj.br/%7Ebrunobuss/">http://www.dcc.ufrj.br/~brunobuss/</a><br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
SaoPaulo-pm mailing list
<a class="moz-txt-link-abbreviated" href="mailto:SaoPaulo-pm@pm.org">SaoPaulo-pm@pm.org</a>
<a class="moz-txt-link-freetext" href="http://mail.pm.org/mailman/listinfo/saopaulo-pm">http://mail.pm.org/mailman/listinfo/saopaulo-pm</a></pre>
</blockquote>
<br>
<br>
</body>
</html>