Commit graph

29 commits

Author SHA1 Message Date
Hediadyoin1
f4072a5038 LibM: Add long double defines of Math Constants 2021-07-02 19:50:43 +02:00
Gunnar Beutner
dae2a59c77 LibC: Add declarations for various C11 math functions 2021-05-09 15:35:01 +02:00
Gunnar Beutner
e6747fefa7 Toolchain+LibM: Make C++ standard library math functions available
With this fixed we get libstdc++v3's aliases for C99 math functions
in the std namespace. Unfortunately for this to work the toolchain
needs to be rebuilt.

The good news are that this by itself does not require a toolchain
rebuild just yet.
2021-05-09 15:35:01 +02:00
Jean-Baptiste Boric
91def742a4 LibM: Fix INFITITY to float
POSIX mandates it.
2021-04-27 23:06:16 +02:00
Jean-Baptiste Boric
7d84f09e7e Userland: Move non-standard math constants from math.h 2021-04-27 23:06:16 +02:00
Matthew Olsson
6c02ea39d1 LibM: Add more macros; increase precision of existing macros 2021-04-23 09:11:07 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Mițca Dumitru
01a49dda85 LibM: Implement fmin/fmax 2021-03-15 22:02:38 +01:00
Mițca Dumitru
2d0f334e5d LibM: Declare rintl in math.h 2021-03-15 22:02:38 +01:00
Mițca Dumitru
32b9437c13 LibM: Add remainder{f, l}
These just forward their arguments to fmod, but I think that should be
fine.
2021-03-14 21:43:08 +01:00
Mițca Dumitru
e4197b7854 LibM: Define HUGE_VAL{F,L} in terms of compiler builtins 2021-03-14 21:43:08 +01:00
Mițca Dumitru
e9533da0e7 LibM: Define MAXFLOAT
Looks like a POSIX extension
2021-03-14 21:43:08 +01:00
Mițca Dumitru
86ee9211be LibM: Define FLT_EVAL_METHOD, float_t and double_t 2021-03-14 21:43:08 +01:00
Mițca Dumitru
1f1a4f488f LibM: Declare ldexpl in math.h
It was already defined, but it wasn't declared in the header
2021-03-14 21:43:08 +01:00
Mițca Dumitru
93c554f6bd LibM: Add the gamma family of functions 2021-03-14 21:43:08 +01:00
Mițca Dumitru
7aac174bc8 LibM: Organise math.h so it is less of a wall of functions
The categories are the same categories used by cppreference on its page
for numeric functions.
2021-03-14 21:43:08 +01:00
Mițca Dumitru
c9601cdee3 LibM: Implement the missing parts of the round family 2021-03-14 21:43:08 +01:00
Mițca Dumitru
03b2d30836 LibM: Add missing float and long double function variants 2021-03-14 21:43:08 +01:00
Mițca Dumitru
b07310dc8b LibM: Add nan{f, l} 2021-03-09 07:28:06 +01:00
Mițca Dumitru
efe4845c56 LibM: Implement more rounding functions
This patch implements the entire rint family, while taking into account
the current rounding mode, and implements ceil, round, trunc, and floor
for types which they weren't before.
2021-03-09 07:28:06 +01:00
Mițca Dumitru
b274120b3c LibM: Implement copysign for float and long double 2021-03-09 07:28:06 +01:00
Mițca Dumitru
87b61b0eef LibM: Add scalbn and associated functions
Also implement ldexp in terms of them, and add ldexpl
2021-03-09 07:28:06 +01:00
Mițca Dumitru
352b383280 LibM: Add ilogb and logb 2021-03-09 07:28:06 +01:00
Mițca Dumitru
42a8186728 LibM: Define floating point comparsion macros 2021-03-09 07:28:06 +01:00
Mițca Dumitru
70737b42b2 LibM: Define math_errhandling and associated macros 2021-03-09 07:28:06 +01:00
Andreas Kling
9f8a9dba0b LibM: Add naive implementation of copysign() 2021-03-05 20:46:25 +01:00
Andreas Kling
6622ad8895 LibM: Improve accuracy of rounding related functions
Patch from Anonymous.
2021-02-05 09:38:45 +01:00
Linus Groh
c46056122a LibM: Add nextafter() and nexttoward() stubs
Only thing missing for Python to build the _math module! :^)
2021-01-18 22:28:56 +01:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Renamed from Libraries/LibM/math.h (Browse further)