Mercurial > octave
changeset 22081:a5a99a830c8c
Set default floating point unit state when initializing the interpreter (bug #48418)
* octave.cc (octave_initialize_interpreter): Call octave_set_default_fpucw.
Fixes floating point calculation precision errors on Windows 32-bit systems.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 07 Jul 2016 13:55:37 -0700 |
parents | 43646269998d |
children | beac7654c86d |
files | libinterp/octave.cc |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave.cc Sat Jul 09 06:08:04 2016 -0700 +++ b/libinterp/octave.cc Thu Jul 07 13:55:37 2016 -0700 @@ -38,6 +38,7 @@ #include "f77-fcn.h" #include "file-ops.h" #include "file-stat.h" +#include "fpucw-wrappers.h" #include "getopt-wrapper.h" #include "lo-error.h" #include "oct-env.h" @@ -782,6 +783,9 @@ octave::sys::env::putenv ("LC_NUMERIC", "C"); octave::sys::env::putenv ("LC_TIME", "C"); + // Initialize the default floating point unit control state + octave_set_default_fpucw (); + octave_embedded = embedded; octave::sys::env::set_program_name (argv[0]);