On Mon, 6 Jul 2015, Brad Chamberlain wrote:

> I'm too close to bedtime to try this myself, but I'm not seeing why:
>
> const sqrtTwo = sqrt(fabs(-2.0));
> const sqrtHalf = sqrt(fabs(-2.0))*0.5;
> writeln((sqrtTwo, sqrtHalf));
>
> would necessarily break the back-end compiler's optimization of the 
> sqrt/fabs calls.

You answered my original question perfectly.

We might have a chat about the above when I have some better examples that 
do not involve floating point and for which I can provide far more clear 
explanations.

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to