Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2012 15:39:24 -0500
From:      Stephen Montgomery-Smith <stephen@missouri.edu>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        freebsd-numerics@freebsd.org, Bruce Evans <brde@optusnet.com.au>
Subject:   Re: Complex arg-trig functions
Message-ID:  <502965FC.1040203@missouri.edu>
In-Reply-To: <20120813201626.GA54144@troutmask.apl.washington.edu>
References:  <20120805030609.R3101@besplex.bde.org> <501D9C36.2040207@missouri.edu> <20120805175106.X3574@besplex.bde.org> <501EC015.3000808@missouri.edu> <20120805191954.GA50379@troutmask.apl.washington.edu> <20120807205725.GA10572@server.rulingia.com> <20120809025220.N4114@besplex.bde.org> <5027F07E.9060409@missouri.edu> <20120814003614.H3692@besplex.bde.org> <50295887.2010608@missouri.edu> <20120813201626.GA54144@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 08/13/2012 03:16 PM, Steve Kargl wrote:
> On Mon, Aug 13, 2012 at 02:41:59PM -0500, Stephen Montgomery-Smith wrote:
>>
>> Also, you made the comment that in the float version, all the 0.5 should
>> become 0.5F.  Two questions:
>> 1.  Doesn't the compiler do this conversion for me?
>
> float x, y;
> y = 0.5 * x;
>
> The conversion is effectively 'y = 0.5 * (double)x' where
> now the rhs is evaluated in double (53-bit precision).  If
> you have 'y = 0.5f * x', then the rhs side is evaluate
> in float (24-bit precision).  For a more complicated,
> expression whether one computes in 53 rather than 24 bits
> can have an effect on the outcome.
>


Thanks for the clarification.

I made the changes in catrigf.c adding "F"s as needed.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?502965FC.1040203>