Floating point precision

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
aliirmak
Posts: 44
Joined: Tue Sep 04, 2007 2:57 pm
Location: PU,West Lafayette, IN

Floating point precision

Post by aliirmak »

Hi all,

What is the float point precision of opensees? Is it the same as c++?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

OpenSees uses double variables for virtually everything internally. the output
precision varies, there are commands to change the defaults.
aliirmak
Posts: 44
Joined: Tue Sep 04, 2007 2:57 pm
Location: PU,West Lafayette, IN

Post by aliirmak »

If we could decrease the precision , would it be in favor of shorter(it should be noticeable) analysis times?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

depends on your computers memory and model size .. float versus double arithmetic is about the same, depends on cpu's fpu but some just treat float as a double .. only benifit i see if in reduced memory size and if that results in less paging.
aliirmak
Posts: 44
Joined: Tue Sep 04, 2007 2:57 pm
Location: PU,West Lafayette, IN

Post by aliirmak »

so that means, reducing precision may be advantageous if we were analyzing having a structure one billion elements.


Anyway, do you think to publish opensees in future compiled for specific processors such as intel or amd, mips risc etc...

At least I know that, instead of gcc, intel c++ compiler gives better run times(faster analysis) due to optimized compiler algorithm for intel processors.
Post Reply