FixedFloatArray.sort() code review
Jonathan "Duke" Leto
jonathan at leto.net
Sat Jan 26 19:26:49 UTC 2013
Howdy,
Thanks, Patrick!
I have updated the branch:
https://github.com/parrot/parrot/compare/ffa_sort
Is anybody interested in writing some more tests? This is a great
opportunity for somebody wanting to dip their feet into writing some PIR.
Duke
On Fri, Jan 25, 2013 at 5:47 PM, Patrick R. Michaud <pmichaud at pobox.com>wrote:
> On Fri, Jan 25, 2013 at 04:54:08PM -0800, Jonathan "Duke" Leto wrote:
> > Howdy,
> >
> > I would appreciate a code review here:
> >
> > https://github.com/parrot/parrot/compare/ffa_sort
> >
> > One thing that I don't quite feel great about is using == on FLOATVALs.
> > What is a better solution? Should I compare them to within some
> tolerance?
>
> Why not...
>
> return (*i < *j) ? -1 : (*i > *j);
>
> This avoids the test for == altogether.
>
> Pm
>
--
Jonathan "Duke" Leto <jonathan at leto.net>
Leto Labs LLC http://labs.leto.net
209.691.DUKE http://dukeleto.pl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.parrot.org/pipermail/parrot-dev/attachments/20130126/3b2a477f/attachment.html>
More information about the parrot-dev
mailing list