mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Make small fixes and oops ran clang-format on dtoa
This commit is contained in:
parent
b5b60015f5
commit
ac00be1a4e
47 changed files with 4933 additions and 5306 deletions
17
libc/tinymath/emodl.h
Normal file
17
libc/tinymath/emodl.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TINYMATH_EMODL_H_
|
||||
#define COSMOPOLITAN_LIBC_TINYMATH_EMODL_H_
|
||||
#include "libc/math.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
/**
|
||||
* Returns Euclidean floating-point division remainder.
|
||||
*
|
||||
* @return (𝑥 mod 𝑦) ∈ [0.,𝑦)
|
||||
* @see fmodl()
|
||||
*/
|
||||
static long double emodl(long double x, long double y) {
|
||||
return x - fabsl(y) * floorl(x / fabsl(y));
|
||||
}
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_TINYMATH_EMODL_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue