RE: Overriding libSystem's math functions
RE: Overriding libSystem's math functions
- Subject: RE: Overriding libSystem's math functions
- From: "Paul Cummings" <email@hidden>
- Date: Mon, 11 Dec 2006 15:42:36 -0500
- Importance: Normal
We use a library called VRPN where our customer has a mac and is sending
messages to our windows machine.
-----Original Message-----
From: xcode-users-bounces+pcummings=email@hidden
[mailto:xcode-users-bounces+pcummings=email@hidden] On
Behalf Of Brad Oliver
Sent: Monday, December 11, 2006 3:32 PM
To: email@hidden
Subject: Re: Overriding libSystem's math functions
On Dec 11, 2006, at 1:05 PM, email@hidden wrote:
>> In an attempt to get identical floating point results across
>> platforms ...
>
> A simple question: Why?
>
> The longer version of the question:
> What do you intend to achieve by doing this? At what cost?
Can't speak for the original poster, but one reason would be for real-
time strategy games. These games work by sending only the minimal
amount of information necessary across the wire to keep the game
flowing. Usually this consists of sending player commands to each
client, and having each player's engine run those commands. For the
games to stay in sync, identical client state calculations are
necessary. Frequently, the games send each other checksums of various
game state to determine if the games are still in sync. If a checksum
is wrong, the "off" player is notified and removed, or the game is
terminated.
In the case of Mac vs. PC play, floating-point inconsistencies across
platforms (no matter how subtle) can cause huge variations in the
checksums. This particular problem is fairly difficult to solve if
you are working on a Mac port and cannot influence the PC source. If
you are the original developer writing the code to be cross-platform,
you have the luxury of being able to engineer your fp results to
match, or take the more dramatic approach of eliminating floating
point entirely.
Regardless, it's not an easy problem to solve. I will add that I've
discovered that it's easier to get synchronized floating point
results between Mac Intel and Mac PPC compared to Win32 Intel, much
to my surprise (and sadness).
--
Brad Oliver
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
om
This email sent to email@hidden
--
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.4/532 - Release Date:
11/13/2006 3:08 PM
--
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.4/532 - Release Date:
11/13/2006 3:08 PM
_______________________________________________
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