octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61812] Math constants (e.g. M_PI) are not par


From: Rik
Subject: [Octave-bug-tracker] [bug #61812] Math constants (e.g. M_PI) are not part of C/C++ standard
Date: Thu, 13 Jan 2022 13:03:51 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

Follow-up Comment #12, bug #61812 (project octave):

I know with MACOS libraries we have had problems with just slightly different
values for certain trig calculations.  By using an expression like
"4.0*atan(1.0)" you get a value that is at least self-consistent with the
libraries being used.  It also gets around cross-compilation issues where M_PI
on the build system might be different than M_PI on the host system.  But,
that would be a really bad idea if build and host were different to begin
with.

In any case, I think we can just get rid of it if we can guarantee that M_PI
is defined.

@markus: According to our guidelines, "octave-config.h" should always be the
first header file included.  Next come C and C++ header files, then liboctave
header files, then libinterp header files.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61812>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]