HomeFreeBSD

math: Add long double constant definitions

Description

math: Add long double constant definitions

These constants are GNU libc extensions that are likely to be adopted
by the next POSIX revision [1]. The definitions can be verified in
a PARI-GP shell session:

  • M_El: exp (1)
  • M_LOG2El: log (exp (1)) / log (2)
  • M_LOG10El: log (exp (1)) / log (10)
  • M_LN2l: log (2)
  • M_LN10l: log (10)
  • M_PIl: Pi
  • M_PI_2l: Pi / 2
  • M_PI_4l: Pi / 4
  • M_1_PIl: 1 / Pi
  • M_2_PIl: 2 / Pi
  • M_2_SQRTPIl: 2 / sqrt (Pi)
  • M_SQRT2l: sqrt (2)
  • M_SQRT1_2l: 1 / sqrt (2)

[1] https://austingroupbugs.net/view.php?id=828

Put these behind BSD_VISIBLE || XSI_VISIBLE >= 800 to future-proof
these changes. They shouldn't be defined at lower levels of XSI, but don't
have other XSI 800 stuff in place yet.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Reviewed by: imp, allanjude
Pull Request: https://github.com/freebsd/freebsd-src/pull/1121

Details

Provenance
collin.funk1_gmail.comAuthored on Apr 12 2024, 5:12 PM
impCommitted on Apr 12 2024, 6:30 PM
Parents
rG6c3e01bf8578: release: Randomize powerpc boot block file name
Branches
Unknown
Tags
Unknown