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: John W. Eaton
Subject: [Octave-bug-tracker] [bug #61812] Math constants (e.g. M_PI) are not part of C/C++ standard
Date: Tue, 25 Jan 2022 12:56:06 -0500 (EST)

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

Instead of using C constants and a gnulib module (which is mostly about C, not
C++ anyway) could we check for the existence of <numbers> and provide
definitions for what we need if it is missing?  Then I think we should be able
to use


std::numbers::pi


and so on where we need them.  Our replacement for <numbers> might not be 100%
compatible with what C++20 provides but I don't see that we need that.  All we
really need is a way to access these constants in a reasonably efficient way
and using the future C++ names seems better to me than using macros like M_PI.

    _______________________________________________________

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]