RE: pow() function returning different results under Rosetta
RE: pow() function returning different results under Rosetta
- Subject: RE: pow() function returning different results under Rosetta
- From: "Cianflone, Chris" <email@hidden>
- Date: Mon, 16 Jan 2006 23:39:47 -0600
- Thread-topic: pow() function returning different results under Rosetta
Title: RE: pow() function returning different results under Rosetta
<<I tested this just now on an iMac with the shipping build, and your
pow() example returns 923521 both natively and translated.
>>
We just tried our app on a shipping iMac and the problem still persists. I haven't yet verified this in the debugger (well via CFShow()s since this is CodeWarrior on Intel), but I suspect it is the same problem since my Calculator test still returns these results:
> And just for fun I tried a similar test on /Applications/Calculator:
>
> Intel on Intel (DTK system):
> 31 ^ 4 = 923521
>
> PPC on Intel (DTK system) with Rosetta:
> 31 ^ 4 = 923520.99999999953
Oh well, I guess we will have to make an updater for our previous version.
Thanks,
Chris
-----Original Message-----
From: Eric Albert [mailto:email@hidden]
Sent: Thu 1/12/2006 5:28 PM
To: Cianflone, Chris
Cc: email@hidden
Subject: Re: pow() function returning different results under Rosetta
On Jan 12, 2006, at 2:54 PM, Cianflone, Chris wrote:
> I hope this is the most appropriate list for this question. We
> have run into a situation which is a critical issue for us on our
> currently shipping application running under Rosetta on a 10.4.3
> DTK system. An important part of our system is failing because pow
> () is returning different results between our PPC app running on a
> PPC machine, and the same PPC app running on the Intel DTK machine
> under Rosetta:
>
> PPC on PPC:
> unsigned long long value = pow( 31, 4 ); // value is 923521
> (correct answer)
>
> PPC on Intel (DTK system) with Rosetta:
> unsigned long long value = pow( 31, 4 ); // value is 923520
>
> And just for fun I tried a similar test on /Applications/Calculator:
>
> Intel on Intel (DTK system):
> 31 ^ 4 = 923521
>
> PPC on Intel (DTK system) with Rosetta:
> 31 ^ 4 = 923520.99999999953
>
> Any chance this is fixed in the version of Rosetta that will ship
> with the new machines? We of course would like to test this on the
> newly announced Intel machines, but all we can do currently is wait
> for our ordered machines to arrive, hopefully before our customers
> get them :)
I tested this just now on an iMac with the shipping build, and your
pow() example returns 923521 both natively and translated.
> (And yes, we have a way to fix this using an integer version of pow
> (), which it should have been originally, but I am just maintaining
> old code and we are concerned about our currently shipping products.)
You should never have to change your code for Rosetta compatibility.
If you ever find yourself thinking of doing that, please file a bug
report. Thanks!
-Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden