gnuastro-devel
[Top][All Lists]
Advanced

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

[task #16070] Add mathematical and physical constants in the arithmetic


From: Pedram Ashofteh Ardakani
Subject: [task #16070] Add mathematical and physical constants in the arithmetic library
Date: Thu, 11 Nov 2021 08:48:02 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

URL:
  <https://savannah.gnu.org/task/?16070>

                 Summary: Add mathematical and physical constants in the
arithmetic library
                 Project: GNU Astronomy Utilities
            Submitted by: pedram
            Submitted on: Thu 11 Nov 2021 01:48:00 PM UTC
         Should Start On: Thu 11 Nov 2021 12:00:00 AM UTC
   Should be Finished on: Thu 11 Nov 2021 12:00:00 AM UTC
                Category: Arithmetic
                Priority: 5 - Normal
              Item Group: Enhancement
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                  Effort: 0.00

    _______________________________________________________

Details:

It would be nice if Arithmetic comprehended mathematical/physical constants
such as 'pi' in the user-given operands.

To achieve this, Mohammad suggests: we can define 'pi' as an operator with no
operand. This operator will just put the number 3.14.... on top of the stack
of operands! In fact, if implemented properly, we can define a whole class of
"constant" operators for this purpose, so as more physical/mathematical
constants become necessary, we can easily add them.

Please note, mathematical constants like the number 'pi' is already in the
'math.h' header of the C library, as well as the math section of the  Gnuastro
dependency: GNU Scientific Library [1]. Also, the most basic
physical/astronomical constants are present as macros in the GNU Scientific
Library [2].

[1] https://www.gnu.org/software/gsl/doc/html/math.html
[2] https://www.gnu.org/software/gsl/doc/html/const.html




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/task/?16070>

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




reply via email to

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