Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2004

Tip: Looking for answers? Try searching our database.

Using the java.lang.Math with different VM

Thread view: 
Kasper K - 12 Mar 2004 11:09 GMT
Hi there,

Does anyone know if java.lang.Math is robust when used with multiple
Virtual Machines? That is does the sin, cos, tan and atan return the
exact same double values when given same double arguments on all VM
including MS VM 1.1.8 to Sun VM 1.4.2?

I think it does not based on testing it. Does anyone have a suggestion
of how to get around this problem? I am making a Bob-Game that relies
on that the server and clients getting the same results. Does there
exist a Math library that is VM and hardware independent e.g. using
look up tables.

/Kasper - Denmark
Boris Stumm - 12 Mar 2004 12:12 GMT
> Does anyone know if java.lang.Math is robust when used with multiple
> Virtual Machines? That is does the sin, cos, tan and atan return the
> exact same double values when given same double arguments on all VM
> including MS VM 1.1.8 to Sun VM 1.4.2?

For that, there is java.lang.StrictMath
Kasper K - 15 Mar 2004 12:45 GMT
> > Does anyone know if java.lang.Math is robust when used with multiple
> > Virtual Machines? That is does the sin, cos, tan and atan return the
> > exact same double values when given same double arguments on all VM
> > including MS VM 1.1.8 to Sun VM 1.4.2?
>
> For that, there is java.lang.StrictMath

Yes that is true but it is only supportet by 1.3 and above. Does
anyone know of a library that can be used from 1.1.8?

/Kasper - Denmark
Roedy Green - 16 Mar 2004 00:25 GMT
>Yes that is true but it is only supportet by 1.3 and above. Does
>anyone know of a library that can be used from 1.1.8?

Early versions were all strict if that is of any help.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.