Google Groups Home
Help | Sign in
Message from discussion Port my ray tracer
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Matthias Blume  
View profile
 More options 2 Jun 2005, 15:41
Newsgroups: comp.lang.functional
From: Matthias Blume <f...@my.address.elsewhere>
Date: Thu, 02 Jun 2005 09:41:47 -0500
Local: Thurs 2 Jun 2005 15:41
Subject: Re: Port my ray tracer
Marcin 'Qrczak' Kowalczyk <qrc...@knm.org.pl> writes:

> Matthew Fluet <mfl...@acm.org> writes:

>>> infix 2 *| fun s *| (x, y, z) = (s*x+0.0, s*y, s*z)

>> fun s *| (x, y, z) : vec = (s*x, s*y, s*z)

>> MLton doesn't actually perform constant folding on floating point
>> operations, so you are paying for some extra operations in the final
>> executable.

> Actually x+0.0 is not the same as x when x is -0.0 (according to IEEE
> floating point semantics - I don't know how SML treats it).

Right.  And that's why it's a bad idea to use +0.0 just for the sake
of indicating a type constraint.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google