Status of double precision

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Status of double precision

Postby jamesm6162 » Wed Aug 12, 2015 9:05 am

Hi

I just recently started using Newton and it works great.

When I attempted to compile Newton in double precision mode by enabling _NEWTON_USE_DOUBLE in the preprocessor definitions (VS2010), the behaviour of my small test world was completely broken.

I basically have a square height field with 100 convex hull boxes spread evenly dropped onto the height field.
With double precision, at start-up, all the boxes spin around an arbitrary axis, and they do not collide with the height field at all.

Is double precision fully supported yet? I couldn't find any definitive answers on the forum.

Thanks

James
jamesm6162
 
Posts: 49
Joined: Wed Aug 12, 2015 8:50 am

Re: Status of double precision

Postby Julio Jerez » Wed Aug 12, 2015 11:20 am

the double precision, is not up today.
There is series of features that I am trying to complete for 3.14, then I will re enable it.
there are some people who has requested, and I myself nee to have for a project I am working on.
so it will be by the end of 3.14
do you need double now?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Status of double precision

Postby jamesm6162 » Thu Aug 13, 2015 2:46 am

Well, I am considering replacing bullet with newton in our application, because it simply works so much better.
However, we have really large worlds in the order of many 100'000's of units, so I suspect we will definitely run into precision issues. (We had to use bullet double precision).

What is your estimated time frame for the completion 3.14?
jamesm6162
 
Posts: 49
Joined: Wed Aug 12, 2015 8:50 am

Re: Status of double precision

Postby Julio Jerez » Tue Aug 18, 2015 2:56 am

I am planning to have these feature in two week front now, maybe tree.
The I will renewable double and declare 3.14 a release.

I will postpone the other features for 3.15
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Status of double precision

Postby Schmackbolzen » Sun Dec 20, 2015 11:05 am

Any news on this? Having double precision support would be really nice, especially for very large worlds.
Schmackbolzen
 
Posts: 26
Joined: Mon Feb 16, 2015 5:37 pm

Re: Status of double precision

Postby jamesm6162 » Wed Jan 27, 2016 5:44 am

Not that I'm aware of. Would be nice though. We have worlds of around 30Kx30K meters and I prefer to avoid ugly workarounds.
jamesm6162
 
Posts: 49
Joined: Wed Aug 12, 2015 8:50 am

Re: Status of double precision

Postby Julio Jerez » Fri Mar 25, 2016 1:29 pm

you can start testing double precision,
in visual studio 2010 there is a debug_double configuration that compile in double precision.
some demos start to work already.
Later I will added the define to the release_double, and to all other projects.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Status of double precision

Postby misho » Sat Mar 26, 2016 2:41 pm

Excellent, thanks Julio! I'll implement it in my project and report the results!

Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Status of double precision

Postby misho » Sat Mar 26, 2016 10:29 pm

Hi Julio!

I'm not sure what project in the archive contains debug_double configuration, but I simply inserted _NEWTON_USE_DOUBLE preprocessor directive into newton project, and it compiled fine. Then , I re-compiled 4 other projects (which I assembled into my solution for minimum of 5 libraries I need), and they compiled fine, in release configuration.

So, in total, for my project I need to use:

newton.lib
core.lib
pthread.lib
dMath.lib
physics.lib

Next, I'll see how my space orbit objects behave with these new libraries...

Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Status of double precision

Postby misho » Sun Mar 27, 2016 1:26 pm

Hi Julio,

After trying to use new libraries (which compiled fine using _NEWTON_USE_DOUBLE), I'm getting 69 linker errors, (newton.lib(Newton.obj) : error LNK2001: unresolved external symbol), starting with:

dgWorld::GetContactMergeTolerance(void)const
dgWorld::SetContactMergeTolerance(double)
dgWorld::AddPreListener(char const *
dgBallConstraint::SetJointParameterCallback(unsigned int

and so on...

Any idea what may be causing this? I'm pointing to the correct libs and headers...

Thanks,
Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Status of double precision

Postby Julio Jerez » Sun Mar 27, 2016 2:49 pm

I just added the release_double dll and is all compile without error. since this is a DLL, I assume all export functions are defined because it will no generate the library if there where undefined.

what visual studio project are you using?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Status of double precision

Postby Julio Jerez » Sun Mar 27, 2016 3:03 pm

if you sync you should get all project with release_double configurations.

I am no adding debug_double because for some reason visual studio do not duplicate the configuration right. I believe is a problem with the debug configuration but I do not know what could be. I only made for the multiconfiguration project but it took me a long time.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Status of double precision

Postby misho » Mon Mar 28, 2016 12:28 am

I'm using static multithreaded, so project_vs2010_static_mt. Like I was saying, I built 5 libraries I needed, using _NEWTON_USE_DEFINE in newton project. Doesn't that mean that I built the static libraries in double precision mode?

Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Status of double precision

Postby misho » Mon Mar 28, 2016 4:13 am

Never mind - I got it going! Looks great!

thanks,
Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Status of double precision

Postby jamesm6162 » Fri Apr 01, 2016 9:03 am

Hi

I'm getting a random exception when running the race car demo in DemoSandbox in debug_double config VS2010:

Unhandled exception at 0x002ac5d0 in demosSandbox_d.exe: 0xC0000090: Floating-point invalid operation


Just drive the car around a bit.

It breaks in the TemplateVector operator*() called from CustomVehicleControllerManager:2125
The only thing out of place is the m_w component of tireOmega is -1.#QNAN as it was initialized from random memory. But the value is only assigned, never used otherwise, so I don't know why the exception happens.

I have disabled all win32 exceptions in VS2010, as well as added the /fp:except- option in the project properties of demosSandbox, but it still happens.

In release_double the problem does not occur. Any ideas? QNAN isn't supposed to raise exceptions right?
jamesm6162
 
Posts: 49
Joined: Wed Aug 12, 2015 8:50 am

Next

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 7 guests

cron