@nberlette/math 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (806) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +889 -0
  3. package/cjs/abs.d.ts +14 -0
  4. package/cjs/abs.d.ts.map +1 -0
  5. package/cjs/abs.js +22 -0
  6. package/cjs/abs.js.map +1 -0
  7. package/cjs/acos.d.ts +17 -0
  8. package/cjs/acos.d.ts.map +1 -0
  9. package/cjs/acos.js +27 -0
  10. package/cjs/acos.js.map +1 -0
  11. package/cjs/acosh.d.ts +11 -0
  12. package/cjs/acosh.d.ts.map +1 -0
  13. package/cjs/acosh.js +35 -0
  14. package/cjs/acosh.js.map +1 -0
  15. package/cjs/asin.d.ts +11 -0
  16. package/cjs/asin.d.ts.map +1 -0
  17. package/cjs/asin.js +28 -0
  18. package/cjs/asin.js.map +1 -0
  19. package/cjs/asinh.d.ts +9 -0
  20. package/cjs/asinh.d.ts.map +1 -0
  21. package/cjs/asinh.js +26 -0
  22. package/cjs/asinh.js.map +1 -0
  23. package/cjs/atan.d.ts +11 -0
  24. package/cjs/atan.d.ts.map +1 -0
  25. package/cjs/atan.js +65 -0
  26. package/cjs/atan.js.map +1 -0
  27. package/cjs/atan2.d.ts +12 -0
  28. package/cjs/atan2.d.ts.map +1 -0
  29. package/cjs/atan2.js +70 -0
  30. package/cjs/atan2.js.map +1 -0
  31. package/cjs/atanh.d.ts +11 -0
  32. package/cjs/atanh.d.ts.map +1 -0
  33. package/cjs/atanh.js +32 -0
  34. package/cjs/atanh.js.map +1 -0
  35. package/cjs/cbrt.d.ts +9 -0
  36. package/cjs/cbrt.d.ts.map +1 -0
  37. package/cjs/cbrt.js +26 -0
  38. package/cjs/cbrt.js.map +1 -0
  39. package/cjs/ceil.d.ts +15 -0
  40. package/cjs/ceil.d.ts.map +1 -0
  41. package/cjs/ceil.js +34 -0
  42. package/cjs/ceil.js.map +1 -0
  43. package/cjs/clamp.d.ts +15 -0
  44. package/cjs/clamp.d.ts.map +1 -0
  45. package/cjs/clamp.js +32 -0
  46. package/cjs/clamp.js.map +1 -0
  47. package/cjs/clz32.d.ts +20 -0
  48. package/cjs/clz32.d.ts.map +1 -0
  49. package/cjs/clz32.js +48 -0
  50. package/cjs/clz32.js.map +1 -0
  51. package/cjs/constants/e.d.ts +17 -0
  52. package/cjs/constants/e.d.ts.map +1 -0
  53. package/cjs/constants/e.js +19 -0
  54. package/cjs/constants/e.js.map +1 -0
  55. package/cjs/constants/epsilon.d.ts +24 -0
  56. package/cjs/constants/epsilon.d.ts.map +1 -0
  57. package/cjs/constants/epsilon.js +26 -0
  58. package/cjs/constants/epsilon.js.map +1 -0
  59. package/cjs/constants/index.d.ts +23 -0
  60. package/cjs/constants/index.d.ts.map +1 -0
  61. package/cjs/constants/index.js +39 -0
  62. package/cjs/constants/index.js.map +1 -0
  63. package/cjs/constants/infinity.d.ts +3 -0
  64. package/cjs/constants/infinity.d.ts.map +1 -0
  65. package/cjs/constants/infinity.js +19 -0
  66. package/cjs/constants/infinity.js.map +1 -0
  67. package/cjs/constants/ln10.d.ts +10 -0
  68. package/cjs/constants/ln10.d.ts.map +1 -0
  69. package/cjs/constants/ln10.js +12 -0
  70. package/cjs/constants/ln10.js.map +1 -0
  71. package/cjs/constants/ln2.d.ts +10 -0
  72. package/cjs/constants/ln2.d.ts.map +1 -0
  73. package/cjs/constants/ln2.js +12 -0
  74. package/cjs/constants/ln2.js.map +1 -0
  75. package/cjs/constants/log10e.d.ts +10 -0
  76. package/cjs/constants/log10e.d.ts.map +1 -0
  77. package/cjs/constants/log10e.js +12 -0
  78. package/cjs/constants/log10e.js.map +1 -0
  79. package/cjs/constants/log2e.d.ts +10 -0
  80. package/cjs/constants/log2e.d.ts.map +1 -0
  81. package/cjs/constants/log2e.js +12 -0
  82. package/cjs/constants/log2e.js.map +1 -0
  83. package/cjs/constants/max_safe_integer.d.ts +11 -0
  84. package/cjs/constants/max_safe_integer.d.ts.map +1 -0
  85. package/cjs/constants/max_safe_integer.js +13 -0
  86. package/cjs/constants/max_safe_integer.js.map +1 -0
  87. package/cjs/constants/max_value.d.ts +10 -0
  88. package/cjs/constants/max_value.d.ts.map +1 -0
  89. package/cjs/constants/max_value.js +12 -0
  90. package/cjs/constants/max_value.js.map +1 -0
  91. package/cjs/constants/min_safe_integer.d.ts +12 -0
  92. package/cjs/constants/min_safe_integer.d.ts.map +1 -0
  93. package/cjs/constants/min_safe_integer.js +14 -0
  94. package/cjs/constants/min_safe_integer.js.map +1 -0
  95. package/cjs/constants/min_value.d.ts +10 -0
  96. package/cjs/constants/min_value.d.ts.map +1 -0
  97. package/cjs/constants/min_value.js +12 -0
  98. package/cjs/constants/min_value.js.map +1 -0
  99. package/cjs/constants/nan.d.ts +47 -0
  100. package/cjs/constants/nan.d.ts.map +1 -0
  101. package/cjs/constants/nan.js +30 -0
  102. package/cjs/constants/nan.js.map +1 -0
  103. package/cjs/constants/negative_infinity.d.ts +28 -0
  104. package/cjs/constants/negative_infinity.d.ts.map +1 -0
  105. package/cjs/constants/negative_infinity.js +15 -0
  106. package/cjs/constants/negative_infinity.js.map +1 -0
  107. package/cjs/constants/negative_zero.d.ts +31 -0
  108. package/cjs/constants/negative_zero.d.ts.map +1 -0
  109. package/cjs/constants/negative_zero.js +21 -0
  110. package/cjs/constants/negative_zero.js.map +1 -0
  111. package/cjs/constants/pi.d.ts +10 -0
  112. package/cjs/constants/pi.d.ts.map +1 -0
  113. package/cjs/constants/pi.js +12 -0
  114. package/cjs/constants/pi.js.map +1 -0
  115. package/cjs/constants/positive_infinity.d.ts +29 -0
  116. package/cjs/constants/positive_infinity.d.ts.map +1 -0
  117. package/cjs/constants/positive_infinity.js +16 -0
  118. package/cjs/constants/positive_infinity.js.map +1 -0
  119. package/cjs/constants/positive_zero.d.ts +38 -0
  120. package/cjs/constants/positive_zero.d.ts.map +1 -0
  121. package/cjs/constants/positive_zero.js +36 -0
  122. package/cjs/constants/positive_zero.js.map +1 -0
  123. package/cjs/constants/sqrt1_2.d.ts +9 -0
  124. package/cjs/constants/sqrt1_2.d.ts.map +1 -0
  125. package/cjs/constants/sqrt1_2.js +11 -0
  126. package/cjs/constants/sqrt1_2.js.map +1 -0
  127. package/cjs/constants/sqrt2.d.ts +9 -0
  128. package/cjs/constants/sqrt2.d.ts.map +1 -0
  129. package/cjs/constants/sqrt2.js +11 -0
  130. package/cjs/constants/sqrt2.js.map +1 -0
  131. package/cjs/cos.d.ts +10 -0
  132. package/cjs/cos.d.ts.map +1 -0
  133. package/cjs/cos.js +32 -0
  134. package/cjs/cos.js.map +1 -0
  135. package/cjs/cosh.d.ts +10 -0
  136. package/cjs/cosh.d.ts.map +1 -0
  137. package/cjs/cosh.js +21 -0
  138. package/cjs/cosh.js.map +1 -0
  139. package/cjs/exp.d.ts +20 -0
  140. package/cjs/exp.d.ts.map +1 -0
  141. package/cjs/exp.js +48 -0
  142. package/cjs/exp.js.map +1 -0
  143. package/cjs/expm1.d.ts +11 -0
  144. package/cjs/expm1.d.ts.map +1 -0
  145. package/cjs/expm1.js +38 -0
  146. package/cjs/expm1.js.map +1 -0
  147. package/cjs/f16round.d.ts +24 -0
  148. package/cjs/f16round.d.ts.map +1 -0
  149. package/cjs/f16round.js +42 -0
  150. package/cjs/f16round.js.map +1 -0
  151. package/cjs/float16/constants.d.ts +97 -0
  152. package/cjs/float16/constants.d.ts.map +1 -0
  153. package/cjs/float16/constants.js +99 -0
  154. package/cjs/float16/constants.js.map +1 -0
  155. package/cjs/float16/decode.d.ts +40 -0
  156. package/cjs/float16/decode.d.ts.map +1 -0
  157. package/cjs/float16/decode.js +67 -0
  158. package/cjs/float16/decode.js.map +1 -0
  159. package/cjs/float16/encode.d.ts +67 -0
  160. package/cjs/float16/encode.d.ts.map +1 -0
  161. package/cjs/float16/encode.js +77 -0
  162. package/cjs/float16/encode.js.map +1 -0
  163. package/cjs/float16/guards.d.ts +22 -0
  164. package/cjs/float16/guards.d.ts.map +1 -0
  165. package/cjs/float16/guards.js +15 -0
  166. package/cjs/float16/guards.js.map +1 -0
  167. package/cjs/float16/index.d.ts +11 -0
  168. package/cjs/float16/index.d.ts.map +1 -0
  169. package/cjs/float16/index.js +27 -0
  170. package/cjs/float16/index.js.map +1 -0
  171. package/cjs/float16/round.d.ts +25 -0
  172. package/cjs/float16/round.d.ts.map +1 -0
  173. package/cjs/float16/round.js +46 -0
  174. package/cjs/float16/round.js.map +1 -0
  175. package/cjs/float32/constants.d.ts +96 -0
  176. package/cjs/float32/constants.d.ts.map +1 -0
  177. package/cjs/float32/constants.js +98 -0
  178. package/cjs/float32/constants.js.map +1 -0
  179. package/cjs/float32/decode.d.ts +38 -0
  180. package/cjs/float32/decode.d.ts.map +1 -0
  181. package/cjs/float32/decode.js +70 -0
  182. package/cjs/float32/decode.js.map +1 -0
  183. package/cjs/float32/encode.d.ts +50 -0
  184. package/cjs/float32/encode.d.ts.map +1 -0
  185. package/cjs/float32/encode.js +77 -0
  186. package/cjs/float32/encode.js.map +1 -0
  187. package/cjs/float32/guards.d.ts +37 -0
  188. package/cjs/float32/guards.d.ts.map +1 -0
  189. package/cjs/float32/guards.js +20 -0
  190. package/cjs/float32/guards.js.map +1 -0
  191. package/cjs/float32/index.d.ts +11 -0
  192. package/cjs/float32/index.d.ts.map +1 -0
  193. package/cjs/float32/index.js +27 -0
  194. package/cjs/float32/index.js.map +1 -0
  195. package/cjs/float32/round.d.ts +23 -0
  196. package/cjs/float32/round.d.ts.map +1 -0
  197. package/cjs/float32/round.js +36 -0
  198. package/cjs/float32/round.js.map +1 -0
  199. package/cjs/floor.d.ts +10 -0
  200. package/cjs/floor.d.ts.map +1 -0
  201. package/cjs/floor.js +32 -0
  202. package/cjs/floor.js.map +1 -0
  203. package/cjs/fround.d.ts +23 -0
  204. package/cjs/fround.d.ts.map +1 -0
  205. package/cjs/fround.js +35 -0
  206. package/cjs/fround.js.map +1 -0
  207. package/cjs/guards/finite.d.ts +23 -0
  208. package/cjs/guards/finite.d.ts.map +1 -0
  209. package/cjs/guards/finite.js +21 -0
  210. package/cjs/guards/finite.js.map +1 -0
  211. package/cjs/guards/index.d.ts +50 -0
  212. package/cjs/guards/index.d.ts.map +1 -0
  213. package/cjs/guards/index.js +66 -0
  214. package/cjs/guards/index.js.map +1 -0
  215. package/cjs/guards/infinity.d.ts +3 -0
  216. package/cjs/guards/infinity.d.ts.map +1 -0
  217. package/cjs/guards/infinity.js +19 -0
  218. package/cjs/guards/infinity.js.map +1 -0
  219. package/cjs/guards/integer.d.ts +47 -0
  220. package/cjs/guards/integer.d.ts.map +1 -0
  221. package/cjs/guards/integer.js +23 -0
  222. package/cjs/guards/integer.js.map +1 -0
  223. package/cjs/guards/nan.d.ts +61 -0
  224. package/cjs/guards/nan.d.ts.map +1 -0
  225. package/cjs/guards/nan.js +68 -0
  226. package/cjs/guards/nan.js.map +1 -0
  227. package/cjs/guards/negative_infinity.d.ts +19 -0
  228. package/cjs/guards/negative_infinity.d.ts.map +1 -0
  229. package/cjs/guards/negative_infinity.js +25 -0
  230. package/cjs/guards/negative_infinity.js.map +1 -0
  231. package/cjs/guards/negative_zero.d.ts +12 -0
  232. package/cjs/guards/negative_zero.d.ts.map +1 -0
  233. package/cjs/guards/negative_zero.js +24 -0
  234. package/cjs/guards/negative_zero.js.map +1 -0
  235. package/cjs/guards/positive_infinity.d.ts +19 -0
  236. package/cjs/guards/positive_infinity.d.ts.map +1 -0
  237. package/cjs/guards/positive_infinity.js +25 -0
  238. package/cjs/guards/positive_infinity.js.map +1 -0
  239. package/cjs/guards/positive_zero.d.ts +17 -0
  240. package/cjs/guards/positive_zero.d.ts.map +1 -0
  241. package/cjs/guards/positive_zero.js +36 -0
  242. package/cjs/guards/positive_zero.js.map +1 -0
  243. package/cjs/guards/safe_integer.d.ts +33 -0
  244. package/cjs/guards/safe_integer.d.ts.map +1 -0
  245. package/cjs/guards/safe_integer.js +27 -0
  246. package/cjs/guards/safe_integer.js.map +1 -0
  247. package/cjs/hypot.d.ts +18 -0
  248. package/cjs/hypot.d.ts.map +1 -0
  249. package/cjs/hypot.js +63 -0
  250. package/cjs/hypot.js.map +1 -0
  251. package/cjs/ieee754.d.ts +16 -0
  252. package/cjs/ieee754.d.ts.map +1 -0
  253. package/cjs/ieee754.js +32 -0
  254. package/cjs/ieee754.js.map +1 -0
  255. package/cjs/imul.d.ts +17 -0
  256. package/cjs/imul.d.ts.map +1 -0
  257. package/cjs/imul.js +24 -0
  258. package/cjs/imul.js.map +1 -0
  259. package/cjs/index.d.ts +84 -0
  260. package/cjs/index.d.ts.map +1 -0
  261. package/cjs/index.js +113 -0
  262. package/cjs/index.js.map +1 -0
  263. package/cjs/internal/ieee754.d.ts +174 -0
  264. package/cjs/internal/ieee754.d.ts.map +1 -0
  265. package/cjs/internal/ieee754.js +200 -0
  266. package/cjs/internal/ieee754.js.map +1 -0
  267. package/cjs/internal/primordials.d.ts +30 -0
  268. package/cjs/internal/primordials.d.ts.map +1 -0
  269. package/cjs/internal/primordials.js +30 -0
  270. package/cjs/internal/primordials.js.map +1 -0
  271. package/cjs/log.d.ts +9 -0
  272. package/cjs/log.d.ts.map +1 -0
  273. package/cjs/log.js +46 -0
  274. package/cjs/log.js.map +1 -0
  275. package/cjs/log10.d.ts +9 -0
  276. package/cjs/log10.d.ts.map +1 -0
  277. package/cjs/log10.js +21 -0
  278. package/cjs/log10.js.map +1 -0
  279. package/cjs/log1p.d.ts +10 -0
  280. package/cjs/log1p.d.ts.map +1 -0
  281. package/cjs/log1p.js +32 -0
  282. package/cjs/log1p.js.map +1 -0
  283. package/cjs/log2.d.ts +12 -0
  284. package/cjs/log2.d.ts.map +1 -0
  285. package/cjs/log2.js +24 -0
  286. package/cjs/log2.js.map +1 -0
  287. package/cjs/max.d.ts +22 -0
  288. package/cjs/max.d.ts.map +1 -0
  289. package/cjs/max.js +51 -0
  290. package/cjs/max.js.map +1 -0
  291. package/cjs/min.d.ts +10 -0
  292. package/cjs/min.d.ts.map +1 -0
  293. package/cjs/min.js +36 -0
  294. package/cjs/min.js.map +1 -0
  295. package/cjs/package.json +3 -0
  296. package/cjs/pow.d.ts +31 -0
  297. package/cjs/pow.d.ts.map +1 -0
  298. package/cjs/pow.js +36 -0
  299. package/cjs/pow.js.map +1 -0
  300. package/cjs/random.d.ts +93 -0
  301. package/cjs/random.d.ts.map +1 -0
  302. package/cjs/random.js +242 -0
  303. package/cjs/random.js.map +1 -0
  304. package/cjs/round.d.ts +9 -0
  305. package/cjs/round.d.ts.map +1 -0
  306. package/cjs/round.js +24 -0
  307. package/cjs/round.js.map +1 -0
  308. package/cjs/sign.d.ts +17 -0
  309. package/cjs/sign.d.ts.map +1 -0
  310. package/cjs/sign.js +22 -0
  311. package/cjs/sign.js.map +1 -0
  312. package/cjs/sin.d.ts +14 -0
  313. package/cjs/sin.d.ts.map +1 -0
  314. package/cjs/sin.js +31 -0
  315. package/cjs/sin.js.map +1 -0
  316. package/cjs/sinh.d.ts +14 -0
  317. package/cjs/sinh.d.ts.map +1 -0
  318. package/cjs/sinh.js +22 -0
  319. package/cjs/sinh.js.map +1 -0
  320. package/cjs/sqrt.d.ts +19 -0
  321. package/cjs/sqrt.d.ts.map +1 -0
  322. package/cjs/sqrt.js +45 -0
  323. package/cjs/sqrt.js.map +1 -0
  324. package/cjs/tan.d.ts +9 -0
  325. package/cjs/tan.d.ts.map +1 -0
  326. package/cjs/tan.js +26 -0
  327. package/cjs/tan.js.map +1 -0
  328. package/cjs/tanh.d.ts +17 -0
  329. package/cjs/tanh.d.ts.map +1 -0
  330. package/cjs/tanh.js +34 -0
  331. package/cjs/tanh.js.map +1 -0
  332. package/cjs/trunc.d.ts +21 -0
  333. package/cjs/trunc.d.ts.map +1 -0
  334. package/cjs/trunc.js +50 -0
  335. package/cjs/trunc.js.map +1 -0
  336. package/cjs/types/finite.d.ts +16 -0
  337. package/cjs/types/finite.d.ts.map +1 -0
  338. package/cjs/types/finite.js +4 -0
  339. package/cjs/types/finite.js.map +1 -0
  340. package/cjs/types/float.d.ts +65 -0
  341. package/cjs/types/float.d.ts.map +1 -0
  342. package/cjs/types/float.js +4 -0
  343. package/cjs/types/float.js.map +1 -0
  344. package/cjs/types/index.d.ts +6 -0
  345. package/cjs/types/index.d.ts.map +1 -0
  346. package/cjs/types/index.js +22 -0
  347. package/cjs/types/index.js.map +1 -0
  348. package/cjs/types/integer.d.ts +147 -0
  349. package/cjs/types/integer.d.ts.map +1 -0
  350. package/cjs/types/integer.js +5 -0
  351. package/cjs/types/integer.js.map +1 -0
  352. package/cjs/types/precision.d.ts +46 -0
  353. package/cjs/types/precision.d.ts.map +1 -0
  354. package/cjs/types/precision.js +9 -0
  355. package/cjs/types/precision.js.map +1 -0
  356. package/cjs/types/safe_integer.d.ts +17 -0
  357. package/cjs/types/safe_integer.d.ts.map +1 -0
  358. package/cjs/types/safe_integer.js +5 -0
  359. package/cjs/types/safe_integer.js.map +1 -0
  360. package/esm/abs.d.ts +14 -0
  361. package/esm/abs.d.ts.map +1 -0
  362. package/esm/abs.js +19 -0
  363. package/esm/abs.js.map +1 -0
  364. package/esm/acos.d.ts +17 -0
  365. package/esm/acos.d.ts.map +1 -0
  366. package/esm/acos.js +24 -0
  367. package/esm/acos.js.map +1 -0
  368. package/esm/acosh.d.ts +11 -0
  369. package/esm/acosh.d.ts.map +1 -0
  370. package/esm/acosh.js +32 -0
  371. package/esm/acosh.js.map +1 -0
  372. package/esm/asin.d.ts +11 -0
  373. package/esm/asin.d.ts.map +1 -0
  374. package/esm/asin.js +25 -0
  375. package/esm/asin.js.map +1 -0
  376. package/esm/asinh.d.ts +9 -0
  377. package/esm/asinh.d.ts.map +1 -0
  378. package/esm/asinh.js +23 -0
  379. package/esm/asinh.js.map +1 -0
  380. package/esm/atan.d.ts +11 -0
  381. package/esm/atan.d.ts.map +1 -0
  382. package/esm/atan.js +62 -0
  383. package/esm/atan.js.map +1 -0
  384. package/esm/atan2.d.ts +12 -0
  385. package/esm/atan2.d.ts.map +1 -0
  386. package/esm/atan2.js +67 -0
  387. package/esm/atan2.js.map +1 -0
  388. package/esm/atanh.d.ts +11 -0
  389. package/esm/atanh.d.ts.map +1 -0
  390. package/esm/atanh.js +29 -0
  391. package/esm/atanh.js.map +1 -0
  392. package/esm/cbrt.d.ts +9 -0
  393. package/esm/cbrt.d.ts.map +1 -0
  394. package/esm/cbrt.js +23 -0
  395. package/esm/cbrt.js.map +1 -0
  396. package/esm/ceil.d.ts +15 -0
  397. package/esm/ceil.d.ts.map +1 -0
  398. package/esm/ceil.js +31 -0
  399. package/esm/ceil.js.map +1 -0
  400. package/esm/clamp.d.ts +15 -0
  401. package/esm/clamp.d.ts.map +1 -0
  402. package/esm/clamp.js +29 -0
  403. package/esm/clamp.js.map +1 -0
  404. package/esm/clz32.d.ts +20 -0
  405. package/esm/clz32.d.ts.map +1 -0
  406. package/esm/clz32.js +45 -0
  407. package/esm/clz32.js.map +1 -0
  408. package/esm/constants/e.d.ts +17 -0
  409. package/esm/constants/e.d.ts.map +1 -0
  410. package/esm/constants/e.js +16 -0
  411. package/esm/constants/e.js.map +1 -0
  412. package/esm/constants/epsilon.d.ts +24 -0
  413. package/esm/constants/epsilon.d.ts.map +1 -0
  414. package/esm/constants/epsilon.js +23 -0
  415. package/esm/constants/epsilon.js.map +1 -0
  416. package/esm/constants/index.d.ts +23 -0
  417. package/esm/constants/index.d.ts.map +1 -0
  418. package/esm/constants/index.js +23 -0
  419. package/esm/constants/index.js.map +1 -0
  420. package/esm/constants/infinity.d.ts +3 -0
  421. package/esm/constants/infinity.d.ts.map +1 -0
  422. package/esm/constants/infinity.js +3 -0
  423. package/esm/constants/infinity.js.map +1 -0
  424. package/esm/constants/ln10.d.ts +10 -0
  425. package/esm/constants/ln10.d.ts.map +1 -0
  426. package/esm/constants/ln10.js +9 -0
  427. package/esm/constants/ln10.js.map +1 -0
  428. package/esm/constants/ln2.d.ts +10 -0
  429. package/esm/constants/ln2.d.ts.map +1 -0
  430. package/esm/constants/ln2.js +9 -0
  431. package/esm/constants/ln2.js.map +1 -0
  432. package/esm/constants/log10e.d.ts +10 -0
  433. package/esm/constants/log10e.d.ts.map +1 -0
  434. package/esm/constants/log10e.js +9 -0
  435. package/esm/constants/log10e.js.map +1 -0
  436. package/esm/constants/log2e.d.ts +10 -0
  437. package/esm/constants/log2e.d.ts.map +1 -0
  438. package/esm/constants/log2e.js +9 -0
  439. package/esm/constants/log2e.js.map +1 -0
  440. package/esm/constants/max_safe_integer.d.ts +11 -0
  441. package/esm/constants/max_safe_integer.d.ts.map +1 -0
  442. package/esm/constants/max_safe_integer.js +10 -0
  443. package/esm/constants/max_safe_integer.js.map +1 -0
  444. package/esm/constants/max_value.d.ts +10 -0
  445. package/esm/constants/max_value.d.ts.map +1 -0
  446. package/esm/constants/max_value.js +9 -0
  447. package/esm/constants/max_value.js.map +1 -0
  448. package/esm/constants/min_safe_integer.d.ts +12 -0
  449. package/esm/constants/min_safe_integer.d.ts.map +1 -0
  450. package/esm/constants/min_safe_integer.js +11 -0
  451. package/esm/constants/min_safe_integer.js.map +1 -0
  452. package/esm/constants/min_value.d.ts +10 -0
  453. package/esm/constants/min_value.d.ts.map +1 -0
  454. package/esm/constants/min_value.js +9 -0
  455. package/esm/constants/min_value.js.map +1 -0
  456. package/esm/constants/nan.d.ts +47 -0
  457. package/esm/constants/nan.d.ts.map +1 -0
  458. package/esm/constants/nan.js +27 -0
  459. package/esm/constants/nan.js.map +1 -0
  460. package/esm/constants/negative_infinity.d.ts +28 -0
  461. package/esm/constants/negative_infinity.d.ts.map +1 -0
  462. package/esm/constants/negative_infinity.js +12 -0
  463. package/esm/constants/negative_infinity.js.map +1 -0
  464. package/esm/constants/negative_zero.d.ts +31 -0
  465. package/esm/constants/negative_zero.d.ts.map +1 -0
  466. package/esm/constants/negative_zero.js +18 -0
  467. package/esm/constants/negative_zero.js.map +1 -0
  468. package/esm/constants/pi.d.ts +10 -0
  469. package/esm/constants/pi.d.ts.map +1 -0
  470. package/esm/constants/pi.js +9 -0
  471. package/esm/constants/pi.js.map +1 -0
  472. package/esm/constants/positive_infinity.d.ts +29 -0
  473. package/esm/constants/positive_infinity.d.ts.map +1 -0
  474. package/esm/constants/positive_infinity.js +13 -0
  475. package/esm/constants/positive_infinity.js.map +1 -0
  476. package/esm/constants/positive_zero.d.ts +38 -0
  477. package/esm/constants/positive_zero.d.ts.map +1 -0
  478. package/esm/constants/positive_zero.js +33 -0
  479. package/esm/constants/positive_zero.js.map +1 -0
  480. package/esm/constants/sqrt1_2.d.ts +9 -0
  481. package/esm/constants/sqrt1_2.d.ts.map +1 -0
  482. package/esm/constants/sqrt1_2.js +8 -0
  483. package/esm/constants/sqrt1_2.js.map +1 -0
  484. package/esm/constants/sqrt2.d.ts +9 -0
  485. package/esm/constants/sqrt2.d.ts.map +1 -0
  486. package/esm/constants/sqrt2.js +8 -0
  487. package/esm/constants/sqrt2.js.map +1 -0
  488. package/esm/cos.d.ts +10 -0
  489. package/esm/cos.d.ts.map +1 -0
  490. package/esm/cos.js +29 -0
  491. package/esm/cos.js.map +1 -0
  492. package/esm/cosh.d.ts +10 -0
  493. package/esm/cosh.d.ts.map +1 -0
  494. package/esm/cosh.js +18 -0
  495. package/esm/cosh.js.map +1 -0
  496. package/esm/exp.d.ts +20 -0
  497. package/esm/exp.d.ts.map +1 -0
  498. package/esm/exp.js +45 -0
  499. package/esm/exp.js.map +1 -0
  500. package/esm/expm1.d.ts +11 -0
  501. package/esm/expm1.d.ts.map +1 -0
  502. package/esm/expm1.js +35 -0
  503. package/esm/expm1.js.map +1 -0
  504. package/esm/f16round.d.ts +24 -0
  505. package/esm/f16round.d.ts.map +1 -0
  506. package/esm/f16round.js +39 -0
  507. package/esm/f16round.js.map +1 -0
  508. package/esm/float16/constants.d.ts +97 -0
  509. package/esm/float16/constants.d.ts.map +1 -0
  510. package/esm/float16/constants.js +96 -0
  511. package/esm/float16/constants.js.map +1 -0
  512. package/esm/float16/decode.d.ts +40 -0
  513. package/esm/float16/decode.d.ts.map +1 -0
  514. package/esm/float16/decode.js +61 -0
  515. package/esm/float16/decode.js.map +1 -0
  516. package/esm/float16/encode.d.ts +67 -0
  517. package/esm/float16/encode.d.ts.map +1 -0
  518. package/esm/float16/encode.js +71 -0
  519. package/esm/float16/encode.js.map +1 -0
  520. package/esm/float16/guards.d.ts +22 -0
  521. package/esm/float16/guards.d.ts.map +1 -0
  522. package/esm/float16/guards.js +12 -0
  523. package/esm/float16/guards.js.map +1 -0
  524. package/esm/float16/index.d.ts +11 -0
  525. package/esm/float16/index.d.ts.map +1 -0
  526. package/esm/float16/index.js +11 -0
  527. package/esm/float16/index.js.map +1 -0
  528. package/esm/float16/round.d.ts +25 -0
  529. package/esm/float16/round.d.ts.map +1 -0
  530. package/esm/float16/round.js +43 -0
  531. package/esm/float16/round.js.map +1 -0
  532. package/esm/float32/constants.d.ts +96 -0
  533. package/esm/float32/constants.d.ts.map +1 -0
  534. package/esm/float32/constants.js +95 -0
  535. package/esm/float32/constants.js.map +1 -0
  536. package/esm/float32/decode.d.ts +38 -0
  537. package/esm/float32/decode.d.ts.map +1 -0
  538. package/esm/float32/decode.js +64 -0
  539. package/esm/float32/decode.js.map +1 -0
  540. package/esm/float32/encode.d.ts +50 -0
  541. package/esm/float32/encode.d.ts.map +1 -0
  542. package/esm/float32/encode.js +71 -0
  543. package/esm/float32/encode.js.map +1 -0
  544. package/esm/float32/guards.d.ts +37 -0
  545. package/esm/float32/guards.d.ts.map +1 -0
  546. package/esm/float32/guards.js +16 -0
  547. package/esm/float32/guards.js.map +1 -0
  548. package/esm/float32/index.d.ts +11 -0
  549. package/esm/float32/index.d.ts.map +1 -0
  550. package/esm/float32/index.js +11 -0
  551. package/esm/float32/index.js.map +1 -0
  552. package/esm/float32/round.d.ts +23 -0
  553. package/esm/float32/round.d.ts.map +1 -0
  554. package/esm/float32/round.js +33 -0
  555. package/esm/float32/round.js.map +1 -0
  556. package/esm/floor.d.ts +10 -0
  557. package/esm/floor.d.ts.map +1 -0
  558. package/esm/floor.js +29 -0
  559. package/esm/floor.js.map +1 -0
  560. package/esm/fround.d.ts +23 -0
  561. package/esm/fround.d.ts.map +1 -0
  562. package/esm/fround.js +32 -0
  563. package/esm/fround.js.map +1 -0
  564. package/esm/guards/finite.d.ts +23 -0
  565. package/esm/guards/finite.d.ts.map +1 -0
  566. package/esm/guards/finite.js +18 -0
  567. package/esm/guards/finite.js.map +1 -0
  568. package/esm/guards/index.d.ts +50 -0
  569. package/esm/guards/index.d.ts.map +1 -0
  570. package/esm/guards/index.js +50 -0
  571. package/esm/guards/index.js.map +1 -0
  572. package/esm/guards/infinity.d.ts +3 -0
  573. package/esm/guards/infinity.d.ts.map +1 -0
  574. package/esm/guards/infinity.js +3 -0
  575. package/esm/guards/infinity.js.map +1 -0
  576. package/esm/guards/integer.d.ts +47 -0
  577. package/esm/guards/integer.d.ts.map +1 -0
  578. package/esm/guards/integer.js +19 -0
  579. package/esm/guards/integer.js.map +1 -0
  580. package/esm/guards/nan.d.ts +61 -0
  581. package/esm/guards/nan.d.ts.map +1 -0
  582. package/esm/guards/nan.js +63 -0
  583. package/esm/guards/nan.js.map +1 -0
  584. package/esm/guards/negative_infinity.d.ts +19 -0
  585. package/esm/guards/negative_infinity.d.ts.map +1 -0
  586. package/esm/guards/negative_infinity.js +21 -0
  587. package/esm/guards/negative_infinity.js.map +1 -0
  588. package/esm/guards/negative_zero.d.ts +12 -0
  589. package/esm/guards/negative_zero.d.ts.map +1 -0
  590. package/esm/guards/negative_zero.js +20 -0
  591. package/esm/guards/negative_zero.js.map +1 -0
  592. package/esm/guards/positive_infinity.d.ts +19 -0
  593. package/esm/guards/positive_infinity.d.ts.map +1 -0
  594. package/esm/guards/positive_infinity.js +21 -0
  595. package/esm/guards/positive_infinity.js.map +1 -0
  596. package/esm/guards/positive_zero.d.ts +17 -0
  597. package/esm/guards/positive_zero.d.ts.map +1 -0
  598. package/esm/guards/positive_zero.js +19 -0
  599. package/esm/guards/positive_zero.js.map +1 -0
  600. package/esm/guards/safe_integer.d.ts +33 -0
  601. package/esm/guards/safe_integer.d.ts.map +1 -0
  602. package/esm/guards/safe_integer.js +22 -0
  603. package/esm/guards/safe_integer.js.map +1 -0
  604. package/esm/hypot.d.ts +18 -0
  605. package/esm/hypot.d.ts.map +1 -0
  606. package/esm/hypot.js +60 -0
  607. package/esm/hypot.js.map +1 -0
  608. package/esm/ieee754.d.ts +16 -0
  609. package/esm/ieee754.d.ts.map +1 -0
  610. package/esm/ieee754.js +16 -0
  611. package/esm/ieee754.js.map +1 -0
  612. package/esm/imul.d.ts +17 -0
  613. package/esm/imul.d.ts.map +1 -0
  614. package/esm/imul.js +21 -0
  615. package/esm/imul.js.map +1 -0
  616. package/esm/index.d.ts +84 -0
  617. package/esm/index.d.ts.map +1 -0
  618. package/esm/index.js +84 -0
  619. package/esm/index.js.map +1 -0
  620. package/esm/internal/ieee754.d.ts +174 -0
  621. package/esm/internal/ieee754.d.ts.map +1 -0
  622. package/esm/internal/ieee754.js +194 -0
  623. package/esm/internal/ieee754.js.map +1 -0
  624. package/esm/internal/primordials.d.ts +30 -0
  625. package/esm/internal/primordials.d.ts.map +1 -0
  626. package/esm/internal/primordials.js +27 -0
  627. package/esm/internal/primordials.js.map +1 -0
  628. package/esm/log.d.ts +9 -0
  629. package/esm/log.d.ts.map +1 -0
  630. package/esm/log.js +43 -0
  631. package/esm/log.js.map +1 -0
  632. package/esm/log10.d.ts +9 -0
  633. package/esm/log10.d.ts.map +1 -0
  634. package/esm/log10.js +18 -0
  635. package/esm/log10.js.map +1 -0
  636. package/esm/log1p.d.ts +10 -0
  637. package/esm/log1p.d.ts.map +1 -0
  638. package/esm/log1p.js +29 -0
  639. package/esm/log1p.js.map +1 -0
  640. package/esm/log2.d.ts +12 -0
  641. package/esm/log2.d.ts.map +1 -0
  642. package/esm/log2.js +21 -0
  643. package/esm/log2.js.map +1 -0
  644. package/esm/max.d.ts +22 -0
  645. package/esm/max.d.ts.map +1 -0
  646. package/esm/max.js +48 -0
  647. package/esm/max.js.map +1 -0
  648. package/esm/min.d.ts +10 -0
  649. package/esm/min.d.ts.map +1 -0
  650. package/esm/min.js +33 -0
  651. package/esm/min.js.map +1 -0
  652. package/esm/package.json +3 -0
  653. package/esm/pow.d.ts +31 -0
  654. package/esm/pow.d.ts.map +1 -0
  655. package/esm/pow.js +33 -0
  656. package/esm/pow.js.map +1 -0
  657. package/esm/random.d.ts +93 -0
  658. package/esm/random.d.ts.map +1 -0
  659. package/esm/random.js +237 -0
  660. package/esm/random.js.map +1 -0
  661. package/esm/round.d.ts +9 -0
  662. package/esm/round.d.ts.map +1 -0
  663. package/esm/round.js +21 -0
  664. package/esm/round.js.map +1 -0
  665. package/esm/sign.d.ts +17 -0
  666. package/esm/sign.d.ts.map +1 -0
  667. package/esm/sign.js +19 -0
  668. package/esm/sign.js.map +1 -0
  669. package/esm/sin.d.ts +14 -0
  670. package/esm/sin.d.ts.map +1 -0
  671. package/esm/sin.js +28 -0
  672. package/esm/sin.js.map +1 -0
  673. package/esm/sinh.d.ts +14 -0
  674. package/esm/sinh.d.ts.map +1 -0
  675. package/esm/sinh.js +19 -0
  676. package/esm/sinh.js.map +1 -0
  677. package/esm/sqrt.d.ts +19 -0
  678. package/esm/sqrt.d.ts.map +1 -0
  679. package/esm/sqrt.js +42 -0
  680. package/esm/sqrt.js.map +1 -0
  681. package/esm/tan.d.ts +9 -0
  682. package/esm/tan.d.ts.map +1 -0
  683. package/esm/tan.js +23 -0
  684. package/esm/tan.js.map +1 -0
  685. package/esm/tanh.d.ts +17 -0
  686. package/esm/tanh.d.ts.map +1 -0
  687. package/esm/tanh.js +31 -0
  688. package/esm/tanh.js.map +1 -0
  689. package/esm/trunc.d.ts +21 -0
  690. package/esm/trunc.d.ts.map +1 -0
  691. package/esm/trunc.js +47 -0
  692. package/esm/trunc.js.map +1 -0
  693. package/esm/types/finite.d.ts +16 -0
  694. package/esm/types/finite.d.ts.map +1 -0
  695. package/esm/types/finite.js +3 -0
  696. package/esm/types/finite.js.map +1 -0
  697. package/esm/types/float.d.ts +65 -0
  698. package/esm/types/float.d.ts.map +1 -0
  699. package/esm/types/float.js +3 -0
  700. package/esm/types/float.js.map +1 -0
  701. package/esm/types/index.d.ts +6 -0
  702. package/esm/types/index.d.ts.map +1 -0
  703. package/esm/types/index.js +6 -0
  704. package/esm/types/index.js.map +1 -0
  705. package/esm/types/integer.d.ts +147 -0
  706. package/esm/types/integer.d.ts.map +1 -0
  707. package/esm/types/integer.js +4 -0
  708. package/esm/types/integer.js.map +1 -0
  709. package/esm/types/precision.d.ts +46 -0
  710. package/esm/types/precision.d.ts.map +1 -0
  711. package/esm/types/precision.js +8 -0
  712. package/esm/types/precision.js.map +1 -0
  713. package/esm/types/safe_integer.d.ts +17 -0
  714. package/esm/types/safe_integer.d.ts.map +1 -0
  715. package/esm/types/safe_integer.js +4 -0
  716. package/esm/types/safe_integer.js.map +1 -0
  717. package/package.json +1834 -0
  718. package/src/abs.ts +18 -0
  719. package/src/acos.ts +24 -0
  720. package/src/acosh.ts +28 -0
  721. package/src/asin.ts +24 -0
  722. package/src/asinh.ts +21 -0
  723. package/src/atan.ts +64 -0
  724. package/src/atan2.ts +58 -0
  725. package/src/atanh.ts +26 -0
  726. package/src/cbrt.ts +22 -0
  727. package/src/ceil.ts +27 -0
  728. package/src/clamp.ts +29 -0
  729. package/src/clz32.ts +45 -0
  730. package/src/constants/e.ts +18 -0
  731. package/src/constants/epsilon.ts +25 -0
  732. package/src/constants/index.ts +22 -0
  733. package/src/constants/infinity.ts +2 -0
  734. package/src/constants/ln10.ts +9 -0
  735. package/src/constants/ln2.ts +9 -0
  736. package/src/constants/log10e.ts +9 -0
  737. package/src/constants/log2e.ts +9 -0
  738. package/src/constants/max_safe_integer.ts +10 -0
  739. package/src/constants/max_value.ts +9 -0
  740. package/src/constants/min_safe_integer.ts +11 -0
  741. package/src/constants/min_value.ts +9 -0
  742. package/src/constants/nan.ts +57 -0
  743. package/src/constants/negative_infinity.ts +28 -0
  744. package/src/constants/negative_zero.ts +34 -0
  745. package/src/constants/pi.ts +9 -0
  746. package/src/constants/positive_infinity.ts +30 -0
  747. package/src/constants/positive_zero.ts +41 -0
  748. package/src/constants/sqrt1_2.ts +8 -0
  749. package/src/constants/sqrt2.ts +8 -0
  750. package/src/cos.ts +29 -0
  751. package/src/cosh.ts +18 -0
  752. package/src/exp.ts +45 -0
  753. package/src/expm1.ts +31 -0
  754. package/src/f16round.ts +39 -0
  755. package/src/float16/constants.ts +106 -0
  756. package/src/float16/decode.ts +61 -0
  757. package/src/float16/encode.ts +72 -0
  758. package/src/float16/guards.ts +33 -0
  759. package/src/float16/index.ts +10 -0
  760. package/src/float16/round.ts +43 -0
  761. package/src/float32/constants.ts +105 -0
  762. package/src/float32/decode.ts +64 -0
  763. package/src/float32/encode.ts +71 -0
  764. package/src/float32/guards.ts +54 -0
  765. package/src/float32/index.ts +10 -0
  766. package/src/float32/round.ts +33 -0
  767. package/src/floor.ts +26 -0
  768. package/src/fround.ts +32 -0
  769. package/src/guards/finite.ts +45 -0
  770. package/src/guards/index.ts +49 -0
  771. package/src/guards/infinity.ts +2 -0
  772. package/src/guards/integer.ts +62 -0
  773. package/src/guards/nan.ts +65 -0
  774. package/src/guards/negative_infinity.ts +22 -0
  775. package/src/guards/negative_zero.ts +21 -0
  776. package/src/guards/positive_infinity.ts +22 -0
  777. package/src/guards/positive_zero.ts +19 -0
  778. package/src/guards/safe_integer.ts +56 -0
  779. package/src/hypot.ts +59 -0
  780. package/src/ieee754.ts +15 -0
  781. package/src/imul.ts +21 -0
  782. package/src/index.ts +84 -0
  783. package/src/internal/ieee754.ts +255 -0
  784. package/src/internal/primordials.ts +33 -0
  785. package/src/log.ts +42 -0
  786. package/src/log10.ts +18 -0
  787. package/src/log1p.ts +26 -0
  788. package/src/log2.ts +21 -0
  789. package/src/max.ts +46 -0
  790. package/src/min.ts +32 -0
  791. package/src/pow.ts +33 -0
  792. package/src/random.ts +241 -0
  793. package/src/round.ts +20 -0
  794. package/src/sign.ts +19 -0
  795. package/src/sin.ts +29 -0
  796. package/src/sinh.ts +19 -0
  797. package/src/sqrt.ts +40 -0
  798. package/src/tan.ts +22 -0
  799. package/src/tanh.ts +28 -0
  800. package/src/trunc.ts +44 -0
  801. package/src/types/finite.ts +23 -0
  802. package/src/types/float.ts +74 -0
  803. package/src/types/index.ts +5 -0
  804. package/src/types/integer.ts +167 -0
  805. package/src/types/precision.ts +51 -0
  806. package/src/types/safe_integer.ts +18 -0
package/cjs/abs.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Performant local implementation of the `Math.abs` function.
3
+ *
4
+ * @module abs
5
+ */
6
+ /**
7
+ * Performant local implementation of the `Math.abs` function.
8
+ *
9
+ * @param x The number to return the absolute value of (magnitude)
10
+ * @returns The absolute value of the provided number.
11
+ * @category Arithmetic
12
+ */
13
+ export declare function abs(x: number): number;
14
+ //# sourceMappingURL=abs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abs.d.ts","sourceRoot":"","sources":["../src/abs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAIrC"}
package/cjs/abs.js ADDED
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Performant local implementation of the `Math.abs` function.
4
+ *
5
+ * @module abs
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.abs = abs;
9
+ /**
10
+ * Performant local implementation of the `Math.abs` function.
11
+ *
12
+ * @param x The number to return the absolute value of (magnitude)
13
+ * @returns The absolute value of the provided number.
14
+ * @category Arithmetic
15
+ */
16
+ function abs(x) {
17
+ x = +x;
18
+ if (x === 0)
19
+ return 0;
20
+ return x < 0 ? -x : x;
21
+ }
22
+ //# sourceMappingURL=abs.js.map
package/cjs/abs.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abs.js","sourceRoot":"","sources":["../src/abs.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AASH,kBAIC;AAXD;;;;;;GAMG;AACH,SAAgB,GAAG,CAAC,CAAS;IAC3B,CAAC,GAAG,CAAC,CAAC,CAAC;IACP,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACxB,CAAC"}
package/cjs/acos.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Calculates the arccosine (inverse cosine) of a number, returning a value in
3
+ * the range `[0, π]`.
4
+ *
5
+ * @module acos
6
+ */
7
+ /**
8
+ * Calculates the arccosine (inverse cosine) of a number, returning a value in
9
+ * the range `[0, π]`.
10
+ *
11
+ * @param x The number whose arccosine is to be calculated (must be between -1
12
+ * and 1).
13
+ * @returns The arccosine of the provided number, in radians.
14
+ * @category Trigonometry
15
+ */
16
+ export declare function acos(x: number): number;
17
+ //# sourceMappingURL=acos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acos.d.ts","sourceRoot":"","sources":["../src/acos.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAGtC"}
package/cjs/acos.js ADDED
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * Calculates the arccosine (inverse cosine) of a number, returning a value in
4
+ * the range `[0, π]`.
5
+ *
6
+ * @module acos
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.acos = acos;
10
+ const nan_js_1 = require("./guards/nan.js");
11
+ const atan2_js_1 = require("./atan2.js");
12
+ const sqrt_js_1 = require("./sqrt.js");
13
+ /**
14
+ * Calculates the arccosine (inverse cosine) of a number, returning a value in
15
+ * the range `[0, π]`.
16
+ *
17
+ * @param x The number whose arccosine is to be calculated (must be between -1
18
+ * and 1).
19
+ * @returns The arccosine of the provided number, in radians.
20
+ * @category Trigonometry
21
+ */
22
+ function acos(x) {
23
+ if ((0, nan_js_1.isNaN)(x) || x < -1 || x > 1)
24
+ return nan_js_1.NaN;
25
+ return (0, atan2_js_1.atan2)((0, sqrt_js_1.sqrt)(1 - x * x), x);
26
+ }
27
+ //# sourceMappingURL=acos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acos.js","sourceRoot":"","sources":["../src/acos.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAeH,oBAGC;AAhBD,4CAA6C;AAC7C,yCAAmC;AACnC,uCAAiC;AAEjC;;;;;;;;GAQG;AACH,SAAgB,IAAI,CAAC,CAAS;IAC5B,IAAI,IAAA,cAAK,EAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,YAAG,CAAC;IAC5C,OAAO,IAAA,gBAAK,EAAC,IAAA,cAAI,EAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACnC,CAAC"}
package/cjs/acosh.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Calculates the inverse hyperbolic cosine of a number, returning a value in
3
+ * the range `[0, +Infinity]`.
4
+ *
5
+ * @param x The number whose inverse hyperbolic cosine is to be calculated
6
+ * (must be >= 1).
7
+ * @returns The inverse hyperbolic cosine of the provided number.
8
+ * @category Trigonometry
9
+ */
10
+ export declare function acosh(x: number): number;
11
+ //# sourceMappingURL=acosh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acosh.d.ts","sourceRoot":"","sources":["../src/acosh.ts"],"names":[],"mappings":"AAYA;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAMvC"}
package/cjs/acosh.js ADDED
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.acosh = acosh;
4
+ /**
5
+ * Calculates the inverse hyperbolic cosine of a number, returning a value in
6
+ * the range `[0, +Infinity]`.
7
+ *
8
+ * @category Trigonometry
9
+ * @module acosh
10
+ */
11
+ const nan_js_1 = require("./constants/nan.js");
12
+ const positive_infinity_js_1 = require("./constants/positive_infinity.js");
13
+ const log_js_1 = require("./log.js");
14
+ const sqrt_js_1 = require("./sqrt.js");
15
+ /**
16
+ * Calculates the inverse hyperbolic cosine of a number, returning a value in
17
+ * the range `[0, +Infinity]`.
18
+ *
19
+ * @param x The number whose inverse hyperbolic cosine is to be calculated
20
+ * (must be >= 1).
21
+ * @returns The inverse hyperbolic cosine of the provided number.
22
+ * @category Trigonometry
23
+ */
24
+ function acosh(x) {
25
+ if (x !== x || x < 1)
26
+ return nan_js_1.NAN;
27
+ if (x === 1)
28
+ return 0;
29
+ if (x === positive_infinity_js_1.POSITIVE_INFINITY)
30
+ return x;
31
+ if (x > 1.0e+7)
32
+ return (0, log_js_1.log)(x) + Math.LN2;
33
+ return (0, log_js_1.log)(x + (0, sqrt_js_1.sqrt)(x * x - 1));
34
+ }
35
+ //# sourceMappingURL=acosh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acosh.js","sourceRoot":"","sources":["../src/acosh.ts"],"names":[],"mappings":";;AAqBA,sBAMC;AA3BD;;;;;;GAMG;AACH,+CAAyC;AACzC,2EAAqE;AACrE,qCAA+B;AAC/B,uCAAiC;AAEjC;;;;;;;;GAQG;AACH,SAAgB,KAAK,CAAC,CAAS;IAC7B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,YAAG,CAAC;IACjC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,IAAI,CAAC,KAAK,wCAAiB;QAAE,OAAO,CAAC,CAAC;IACtC,IAAI,CAAC,GAAG,MAAM;QAAE,OAAO,IAAA,YAAG,EAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;IACzC,OAAO,IAAA,YAAG,EAAC,CAAC,GAAG,IAAA,cAAI,EAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC"}
package/cjs/asin.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Calculates the arcsine (inverse sine) of a number, returning a value in the
3
+ * range `[-π/2, π/2]`.
4
+ *
5
+ * @param x The number whose arcsine is to be calculated (must be between -1
6
+ * and 1).
7
+ * @returns The arcsine of the provided number, in radians.
8
+ * @category Trigonometry
9
+ */
10
+ export declare function asin(x: number): number;
11
+ //# sourceMappingURL=asin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asin.d.ts","sourceRoot":"","sources":["../src/asin.ts"],"names":[],"mappings":"AAWA;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAGtC"}
package/cjs/asin.js ADDED
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.asin = asin;
4
+ /**
5
+ * Calculates the arcsine (inverse sine) of a number, returning a value in the
6
+ * range `[-π/2, π/2]`.
7
+ *
8
+ * @category Trigonometry
9
+ * @module asin
10
+ */
11
+ const nan_js_1 = require("./constants/nan.js");
12
+ const atan2_js_1 = require("./atan2.js");
13
+ const sqrt_js_1 = require("./sqrt.js");
14
+ /**
15
+ * Calculates the arcsine (inverse sine) of a number, returning a value in the
16
+ * range `[-π/2, π/2]`.
17
+ *
18
+ * @param x The number whose arcsine is to be calculated (must be between -1
19
+ * and 1).
20
+ * @returns The arcsine of the provided number, in radians.
21
+ * @category Trigonometry
22
+ */
23
+ function asin(x) {
24
+ if (x !== x || x < -1 || x > 1)
25
+ return nan_js_1.NAN;
26
+ return (0, atan2_js_1.atan2)(x, (0, sqrt_js_1.sqrt)(1 - x * x));
27
+ }
28
+ //# sourceMappingURL=asin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asin.js","sourceRoot":"","sources":["../src/asin.ts"],"names":[],"mappings":";;AAoBA,oBAGC;AAvBD;;;;;;GAMG;AACH,+CAAyC;AACzC,yCAAmC;AACnC,uCAAiC;AAEjC;;;;;;;;GAQG;AACH,SAAgB,IAAI,CAAC,CAAS;IAC5B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,YAAG,CAAC;IAC3C,OAAO,IAAA,gBAAK,EAAC,CAAC,EAAE,IAAA,cAAI,EAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC"}
package/cjs/asinh.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Calculates the inverse hyperbolic sine of a number.
3
+ *
4
+ * @param x The number whose inverse hyperbolic sine is to be calculated.
5
+ * @returns The inverse hyperbolic sine of the provided number.
6
+ * @category Trigonometry
7
+ */
8
+ export declare function asinh(x: number): number;
9
+ //# sourceMappingURL=asinh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asinh.d.ts","sourceRoot":"","sources":["../src/asinh.ts"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAIvC"}
package/cjs/asinh.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.asinh = asinh;
4
+ /**
5
+ * Calculates the inverse hyperbolic sine of a number.
6
+ *
7
+ * @module asinh
8
+ */
9
+ const finite_js_1 = require("./guards/finite.js");
10
+ const log_js_1 = require("./log.js");
11
+ const sqrt_js_1 = require("./sqrt.js");
12
+ /**
13
+ * Calculates the inverse hyperbolic sine of a number.
14
+ *
15
+ * @param x The number whose inverse hyperbolic sine is to be calculated.
16
+ * @returns The inverse hyperbolic sine of the provided number.
17
+ * @category Trigonometry
18
+ */
19
+ function asinh(x) {
20
+ if (x === 0)
21
+ return x;
22
+ if (!(0, finite_js_1.isFinite)(x))
23
+ return x;
24
+ return (0, log_js_1.log)(x + (0, sqrt_js_1.sqrt)(x * x + 1));
25
+ }
26
+ //# sourceMappingURL=asinh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asinh.js","sourceRoot":"","sources":["../src/asinh.ts"],"names":[],"mappings":";;AAgBA,sBAIC;AApBD;;;;GAIG;AACH,kDAA8C;AAC9C,qCAA+B;AAC/B,uCAAiC;AAEjC;;;;;;GAMG;AACH,SAAgB,KAAK,CAAC,CAAS;IAC7B,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,IAAI,CAAC,IAAA,oBAAQ,EAAC,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IAC3B,OAAO,IAAA,YAAG,EAAC,CAAC,GAAG,IAAA,cAAI,EAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC"}
package/cjs/atan.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Calculates the arctangent (inverse tangent) of a number, returning a value
3
+ * in the range `[-π/2, π/2]`.
4
+ *
5
+ * @param x The number whose arctangent is to be calculated.
6
+ * @returns The arctangent of the provided number, in radians.
7
+ * @category Trigonometry
8
+ * @tags tangent, arctangent
9
+ */
10
+ export declare function atan(x: number): number;
11
+ //# sourceMappingURL=atan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atan.d.ts","sourceRoot":"","sources":["../src/atan.ts"],"names":[],"mappings":"AAaA;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAyCtC"}
package/cjs/atan.js ADDED
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.atan = atan;
4
+ /**
5
+ * Calculates the arctangent (inverse tangent) of a number, returning a value
6
+ * in the range `[-π/2, π/2]`.
7
+ *
8
+ * @module atan
9
+ */
10
+ const abs_js_1 = require("./abs.js");
11
+ const nan_js_1 = require("./constants/nan.js");
12
+ const pi_js_1 = require("./constants/pi.js");
13
+ const positive_infinity_js_1 = require("./constants/positive_infinity.js");
14
+ const negative_infinity_js_1 = require("./constants/negative_infinity.js");
15
+ const epsilon_js_1 = require("./constants/epsilon.js");
16
+ /**
17
+ * Calculates the arctangent (inverse tangent) of a number, returning a value
18
+ * in the range `[-π/2, π/2]`.
19
+ *
20
+ * @param x The number whose arctangent is to be calculated.
21
+ * @returns The arctangent of the provided number, in radians.
22
+ * @category Trigonometry
23
+ * @tags tangent, arctangent
24
+ */
25
+ function atan(x) {
26
+ const PI_OVER_2 = pi_js_1.PI / 2, PI_OVER_4 = pi_js_1.PI / 4;
27
+ if (isNaN(x))
28
+ return nan_js_1.NAN;
29
+ if (x === positive_infinity_js_1.POSITIVE_INFINITY)
30
+ return PI_OVER_2;
31
+ if (x === negative_infinity_js_1.NEGATIVE_INFINITY)
32
+ return -PI_OVER_2;
33
+ if (x === 0)
34
+ return x; // Preserve -0
35
+ if (x < 0)
36
+ return -atan(-x);
37
+ // for large x, use the identity: arctan(x) = π/2 - arctan(1/x)
38
+ if (x > 1)
39
+ return PI_OVER_2 - atan(1 / x);
40
+ // for x near 1, use an alternative series expansion
41
+ if (x > 0.5) {
42
+ const a = (x - 1) / (x + 1), a2 = a * a;
43
+ let term = a, sum = term, n = 1;
44
+ // Use a convergence threshold appropriate for double-precision
45
+ // floating-point numbers
46
+ const MAX_ITERATIONS = 1000;
47
+ while ((0, abs_js_1.abs)(term) > epsilon_js_1.EPSILON && n < MAX_ITERATIONS) {
48
+ term *= -a2;
49
+ sum += term / (2 * n + 1);
50
+ n++;
51
+ }
52
+ return PI_OVER_4 + sum;
53
+ }
54
+ // for x <= 0.5, use the standard Taylor series expansion
55
+ const x2 = x * x;
56
+ let term = x, sum = x, n = 1;
57
+ const MAX_ITERATIONS = 1e5;
58
+ while ((0, abs_js_1.abs)(term) > epsilon_js_1.EPSILON && n < MAX_ITERATIONS) {
59
+ term *= -x2;
60
+ sum += term / (2 * n + 1);
61
+ n++;
62
+ }
63
+ return sum;
64
+ }
65
+ //# sourceMappingURL=atan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atan.js","sourceRoot":"","sources":["../src/atan.ts"],"names":[],"mappings":";;AAsBA,oBAyCC;AA/DD;;;;;GAKG;AACH,qCAA+B;AAC/B,+CAAyC;AACzC,6CAAuC;AACvC,2EAAqE;AACrE,2EAAqE;AACrE,uDAAiD;AAEjD;;;;;;;;GAQG;AACH,SAAgB,IAAI,CAAC,CAAS;IAC5B,MAAM,SAAS,GAAG,UAAE,GAAG,CAAC,EAAE,SAAS,GAAG,UAAE,GAAG,CAAC,CAAC;IAE7C,IAAI,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO,YAAG,CAAC;IACzB,IAAI,CAAC,KAAK,wCAAiB;QAAE,OAAO,SAAS,CAAC;IAC9C,IAAI,CAAC,KAAK,wCAAiB;QAAE,OAAO,CAAC,SAAS,CAAC;IAC/C,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC,CAAC,cAAc;IACrC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAE5B,+DAA+D;IAC/D,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAE1C,oDAAoD;IACpD,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACZ,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,IAAI,GAAG,CAAC,EAAE,GAAG,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;QAEhC,+DAA+D;QAC/D,yBAAyB;QACzB,MAAM,cAAc,GAAG,IAAI,CAAC;QAC5B,OAAO,IAAA,YAAG,EAAC,IAAI,CAAC,GAAG,oBAAO,IAAI,CAAC,GAAG,cAAc,EAAE,CAAC;YACjD,IAAI,IAAI,CAAC,EAAE,CAAC;YACZ,GAAG,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YAC1B,CAAC,EAAE,CAAC;QACN,CAAC;QAED,OAAO,SAAS,GAAG,GAAG,CAAC;IACzB,CAAC;IAED,yDAAyD;IACzD,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,IAAI,IAAI,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAE7B,MAAM,cAAc,GAAG,GAAG,CAAC;IAC3B,OAAO,IAAA,YAAG,EAAC,IAAI,CAAC,GAAG,oBAAO,IAAI,CAAC,GAAG,cAAc,EAAE,CAAC;QACjD,IAAI,IAAI,CAAC,EAAE,CAAC;QACZ,GAAG,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1B,CAAC,EAAE,CAAC;IACN,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
package/cjs/atan2.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Calculates the arctangent of the quotient of its arguments, `y / x`,
3
+ * returning a value in the range `(-π, π]`.
4
+ *
5
+ * @param y The ordinate coordinate.
6
+ * @param x The abscissa coordinate.
7
+ * @returns The angle between the positive x-axis and point (x, y), in radians.
8
+ * @category Trigonometry
9
+ * @tags angle, arctangent
10
+ */
11
+ export declare function atan2(y: number, x: number): number;
12
+ //# sourceMappingURL=atan2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atan2.d.ts","sourceRoot":"","sources":["../src/atan2.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CA+BlD"}
package/cjs/atan2.js ADDED
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.atan2 = atan2;
4
+ /**
5
+ * Calculates the arctangent of the quotient of its arguments, `y / x`,
6
+ * returning a value in the range `(-π, π]`.
7
+ *
8
+ * @module atan2
9
+ */
10
+ const nan_js_1 = require("./constants/nan.js");
11
+ const pi_js_1 = require("./constants/pi.js");
12
+ const atan_js_1 = require("./atan.js");
13
+ const nan_js_2 = require("./guards/nan.js");
14
+ const negative_zero_js_1 = require("./guards/negative_zero.js");
15
+ const negative_infinity_js_1 = require("./guards/negative_infinity.js");
16
+ const positive_infinity_js_1 = require("./guards/positive_infinity.js");
17
+ const PI_OVER_2 = pi_js_1.PI / 2, PI_OVER_4 = pi_js_1.PI / 4;
18
+ /**
19
+ * Calculates the arctangent of the quotient of its arguments, `y / x`,
20
+ * returning a value in the range `(-π, π]`.
21
+ *
22
+ * @param y The ordinate coordinate.
23
+ * @param x The abscissa coordinate.
24
+ * @returns The angle between the positive x-axis and point (x, y), in radians.
25
+ * @category Trigonometry
26
+ * @tags angle, arctangent
27
+ */
28
+ function atan2(y, x) {
29
+ // fast paths for special cases
30
+ if ((0, nan_js_2.isNaN)(y) || (0, nan_js_2.isNaN)(x))
31
+ return nan_js_1.NAN;
32
+ if (y === 0 && x === 0) {
33
+ if ((0, negative_zero_js_1.isNegativeZero)(y) && (0, negative_zero_js_1.isNegativeZero)(x))
34
+ return -pi_js_1.PI;
35
+ if ((0, negative_zero_js_1.isNegativeZero)(y))
36
+ return -0;
37
+ if ((0, negative_zero_js_1.isNegativeZero)(x))
38
+ return pi_js_1.PI;
39
+ return 0;
40
+ }
41
+ if (x === 0) {
42
+ if (y > 0)
43
+ return PI_OVER_2;
44
+ if (y < 0)
45
+ return -PI_OVER_2;
46
+ return nan_js_1.NAN; // unreachable
47
+ }
48
+ // x (and possibly y) is infinity/-infinity
49
+ if ((0, positive_infinity_js_1.isPositiveInfinity)(x)) {
50
+ if ((0, positive_infinity_js_1.isPositiveInfinity)(y))
51
+ return PI_OVER_4;
52
+ if ((0, negative_infinity_js_1.isNegativeInfinity)(y))
53
+ return -PI_OVER_4;
54
+ return y < 0 || (0, negative_zero_js_1.isNegativeZero)(y) ? -0 : 0;
55
+ }
56
+ else if ((0, negative_infinity_js_1.isNegativeInfinity)(x)) {
57
+ if ((0, positive_infinity_js_1.isPositiveInfinity)(y))
58
+ return 3 * PI_OVER_4;
59
+ if ((0, negative_infinity_js_1.isNegativeInfinity)(y))
60
+ return -3 * PI_OVER_4;
61
+ return y < 0 || (0, negative_zero_js_1.isNegativeZero)(y) ? -pi_js_1.PI : pi_js_1.PI;
62
+ }
63
+ if (x > 0)
64
+ return (0, atan_js_1.atan)(y / x);
65
+ if (x < 0)
66
+ return (0, atan_js_1.atan)(y / x) + (y < 0 || (0, negative_zero_js_1.isNegativeZero)(y) ? -pi_js_1.PI : pi_js_1.PI);
67
+ // deno-coverage-ignore
68
+ return nan_js_1.NAN; // this should never happen
69
+ }
70
+ //# sourceMappingURL=atan2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atan2.js","sourceRoot":"","sources":["../src/atan2.ts"],"names":[],"mappings":";;AA0BA,sBA+BC;AAzDD;;;;;GAKG;AACH,+CAAyC;AACzC,6CAAuC;AACvC,uCAAiC;AACjC,4CAAwC;AACxC,gEAA2D;AAC3D,wEAAmE;AACnE,wEAAmE;AAEnE,MAAM,SAAS,GAAG,UAAE,GAAG,CAAC,EAAE,SAAS,GAAG,UAAE,GAAG,CAAC,CAAC;AAE7C;;;;;;;;;GASG;AACH,SAAgB,KAAK,CAAC,CAAS,EAAE,CAAS;IACxC,+BAA+B;IAC/B,IAAI,IAAA,cAAK,EAAC,CAAC,CAAC,IAAI,IAAA,cAAK,EAAC,CAAC,CAAC;QAAE,OAAO,YAAG,CAAC;IACrC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACvB,IAAI,IAAA,iCAAc,EAAC,CAAC,CAAC,IAAI,IAAA,iCAAc,EAAC,CAAC,CAAC;YAAE,OAAO,CAAC,UAAE,CAAC;QACvD,IAAI,IAAA,iCAAc,EAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC,CAAC;QACjC,IAAI,IAAA,iCAAc,EAAC,CAAC,CAAC;YAAE,OAAO,UAAE,CAAC;QACjC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACZ,IAAI,CAAC,GAAG,CAAC;YAAE,OAAO,SAAS,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC;YAAE,OAAO,CAAC,SAAS,CAAC;QAC7B,OAAO,YAAG,CAAC,CAAC,cAAc;IAC5B,CAAC;IAED,2CAA2C;IAC3C,IAAI,IAAA,yCAAkB,EAAC,CAAC,CAAC,EAAE,CAAC;QAC1B,IAAI,IAAA,yCAAkB,EAAC,CAAC,CAAC;YAAE,OAAO,SAAS,CAAC;QAC5C,IAAI,IAAA,yCAAkB,EAAC,CAAC,CAAC;YAAE,OAAO,CAAC,SAAS,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,IAAI,IAAA,iCAAc,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;SAAM,IAAI,IAAA,yCAAkB,EAAC,CAAC,CAAC,EAAE,CAAC;QACjC,IAAI,IAAA,yCAAkB,EAAC,CAAC,CAAC;YAAE,OAAO,CAAC,GAAG,SAAS,CAAC;QAChD,IAAI,IAAA,yCAAkB,EAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,IAAI,IAAA,iCAAc,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAE,CAAC,CAAC,CAAC,UAAE,CAAC;IAC/C,CAAC;IAED,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAA,cAAI,EAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAA,cAAI,EAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,IAAA,iCAAc,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAE,CAAC,CAAC,CAAC,UAAE,CAAC,CAAC;IAExE,uBAAuB;IACvB,OAAO,YAAG,CAAC,CAAC,2BAA2B;AACzC,CAAC"}
package/cjs/atanh.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Calculates the inverse hyperbolic tangent of a number, returning a value in
3
+ * the range `[-∞, +∞]`.
4
+ *
5
+ * @param x The number whose inverse hyperbolic tangent is to be calculated
6
+ * (must be between -1 and 1).
7
+ * @returns The inverse hyperbolic tangent of the provided number.
8
+ * @category Trigonometry
9
+ */
10
+ export declare function atanh(x: number): number;
11
+ //# sourceMappingURL=atanh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atanh.d.ts","sourceRoot":"","sources":["../src/atanh.ts"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAMvC"}
package/cjs/atanh.js ADDED
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.atanh = atanh;
4
+ /**
5
+ * Calculates the inverse hyperbolic tangent of a number, returning a value in
6
+ * the range `[-∞, +∞]`.
7
+ *
8
+ * @module atanh
9
+ */
10
+ const nan_js_1 = require("./guards/nan.js");
11
+ const positive_infinity_js_1 = require("./constants/positive_infinity.js");
12
+ const log1p_js_1 = require("./log1p.js");
13
+ /**
14
+ * Calculates the inverse hyperbolic tangent of a number, returning a value in
15
+ * the range `[-∞, +∞]`.
16
+ *
17
+ * @param x The number whose inverse hyperbolic tangent is to be calculated
18
+ * (must be between -1 and 1).
19
+ * @returns The inverse hyperbolic tangent of the provided number.
20
+ * @category Trigonometry
21
+ */
22
+ function atanh(x) {
23
+ if ((0, nan_js_1.isNaN)(x) || x < -1 || x > 1)
24
+ return nan_js_1.NAN;
25
+ if (x === -1 || x === 1)
26
+ return x * positive_infinity_js_1.POSITIVE_INFINITY;
27
+ if (x === 0)
28
+ return x;
29
+ // Use log1p for better precision near 0 and to match native behavior.
30
+ return 0.5 * (0, log1p_js_1.log1p)((2 * x) / (1 - x));
31
+ }
32
+ //# sourceMappingURL=atanh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atanh.js","sourceRoot":"","sources":["../src/atanh.ts"],"names":[],"mappings":";;AAmBA,sBAMC;AAzBD;;;;;GAKG;AACH,4CAA6C;AAC7C,2EAAqE;AACrE,yCAAmC;AAEnC;;;;;;;;GAQG;AACH,SAAgB,KAAK,CAAC,CAAS;IAC7B,IAAI,IAAA,cAAK,EAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,YAAG,CAAC;IAC5C,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,GAAG,wCAAiB,CAAC;IACtD,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,sEAAsE;IACtE,OAAO,GAAG,GAAG,IAAA,gBAAK,EAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACxC,CAAC"}
package/cjs/cbrt.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Calculates the cube root of a number, handling negative values as well.
3
+ *
4
+ * @param x The number whose cube root is to be calculated.
5
+ * @returns The cube root of the provided number.
6
+ * @category Arithmetic
7
+ */
8
+ export declare function cbrt(x: number): number;
9
+ //# sourceMappingURL=cbrt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cbrt.d.ts","sourceRoot":"","sources":["../src/cbrt.ts"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAKtC"}
package/cjs/cbrt.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cbrt = cbrt;
4
+ /**
5
+ * Calculates the cube root of a number, handling negative values as well.
6
+ *
7
+ * @module cbrt
8
+ */
9
+ const abs_js_1 = require("./abs.js");
10
+ const exp_js_1 = require("./exp.js");
11
+ const log_js_1 = require("./log.js");
12
+ /**
13
+ * Calculates the cube root of a number, handling negative values as well.
14
+ *
15
+ * @param x The number whose cube root is to be calculated.
16
+ * @returns The cube root of the provided number.
17
+ * @category Arithmetic
18
+ */
19
+ function cbrt(x) {
20
+ if (x === 0)
21
+ return x;
22
+ const absX = (0, abs_js_1.abs)(x);
23
+ const result = (0, exp_js_1.exp)((0, log_js_1.log)(absX) / 3);
24
+ return x < 0 ? -result : result;
25
+ }
26
+ //# sourceMappingURL=cbrt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cbrt.js","sourceRoot":"","sources":["../src/cbrt.ts"],"names":[],"mappings":";;AAgBA,oBAKC;AArBD;;;;GAIG;AACH,qCAA+B;AAC/B,qCAA+B;AAC/B,qCAA+B;AAE/B;;;;;;GAMG;AACH,SAAgB,IAAI,CAAC,CAAS;IAC5B,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,MAAM,IAAI,GAAG,IAAA,YAAG,EAAC,CAAC,CAAC,CAAC;IACpB,MAAM,MAAM,GAAG,IAAA,YAAG,EAAC,IAAA,YAAG,EAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AAClC,CAAC"}
package/cjs/ceil.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Performant local implementation of the `Math.ceil` function.
3
+ *
4
+ * @module ceil
5
+ */
6
+ /**
7
+ * Performant local implementation of the `Math.ceil` function.
8
+ *
9
+ * @param x The number to round up to the nearest whole number
10
+ * @returns The smallest integer greater than or equal to the provided number.
11
+ * @category Rounding
12
+ * @tags rounding, ceiling
13
+ */
14
+ export declare function ceil(x: number): number;
15
+ //# sourceMappingURL=ceil.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ceil.d.ts","sourceRoot":"","sources":["../src/ceil.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAStC"}
package/cjs/ceil.js ADDED
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /**
3
+ * Performant local implementation of the `Math.ceil` function.
4
+ *
5
+ * @module ceil
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ceil = ceil;
9
+ const negative_infinity_js_1 = require("./constants/negative_infinity.js");
10
+ const positive_infinity_js_1 = require("./constants/positive_infinity.js");
11
+ /**
12
+ * Performant local implementation of the `Math.ceil` function.
13
+ *
14
+ * @param x The number to round up to the nearest whole number
15
+ * @returns The smallest integer greater than or equal to the provided number.
16
+ * @category Rounding
17
+ * @tags rounding, ceiling
18
+ */
19
+ function ceil(x) {
20
+ x = +x;
21
+ if (x !== x || x === positive_infinity_js_1.POSITIVE_INFINITY || x === negative_infinity_js_1.NEGATIVE_INFINITY)
22
+ return x;
23
+ if (x === 0)
24
+ return x;
25
+ const remainder = x % 1;
26
+ if (remainder === 0)
27
+ return x;
28
+ if (x < 0 && x > -1)
29
+ return -0;
30
+ if (x > 0)
31
+ return x - remainder + 1;
32
+ return x - remainder;
33
+ }
34
+ //# sourceMappingURL=ceil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ceil.js","sourceRoot":"","sources":["../src/ceil.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAaH,oBASC;AApBD,2EAAqE;AACrE,2EAAqE;AAErE;;;;;;;GAOG;AACH,SAAgB,IAAI,CAAC,CAAS;IAC5B,CAAC,GAAG,CAAC,CAAC,CAAC;IACP,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,wCAAiB,IAAI,CAAC,KAAK,wCAAiB;QAAE,OAAO,CAAC,CAAC;IAC5E,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IACtB,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,SAAS,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC,CAAC;IAC/B,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,SAAS,CAAC;AACvB,CAAC"}
package/cjs/clamp.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Clamps a number within the inclusive range specified by the lower and upper
3
+ * bounds. This is useful for ensuring that a number does not exceed a certain
4
+ * range, and is equivalent to `Math.min(Math.max(number, lower), upper)` (but
5
+ * with no dependency on the global `Math` object).
6
+ *
7
+ * @param number The number to clamp
8
+ * @param lower The lower bound of the clamp range
9
+ * @param upper The upper bound of the clamp range
10
+ * @returns The clamped value guaranteed to be within the provided range.
11
+ * @category Rounding
12
+ * @tags non-standard, clamp
13
+ */
14
+ export declare function clamp(number: number, lower: number, upper: number): number;
15
+ //# sourceMappingURL=clamp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clamp.d.ts","sourceRoot":"","sources":["../src/clamp.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;GAYG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1E"}
package/cjs/clamp.js ADDED
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.clamp = clamp;
4
+ /**
5
+ * Clamps a number within the inclusive range specified by the lower and upper
6
+ * bounds. This is useful for ensuring that a number does not exceed a certain
7
+ * range, and is equivalent to `Math.min(Math.max(number, lower), upper)` (but
8
+ * with no dependency on the global `Math` object).
9
+ *
10
+ * **Note**: this is a non-standard utility function.
11
+ *
12
+ * @module clamp
13
+ */
14
+ const max_js_1 = require("./max.js");
15
+ const min_js_1 = require("./min.js");
16
+ /**
17
+ * Clamps a number within the inclusive range specified by the lower and upper
18
+ * bounds. This is useful for ensuring that a number does not exceed a certain
19
+ * range, and is equivalent to `Math.min(Math.max(number, lower), upper)` (but
20
+ * with no dependency on the global `Math` object).
21
+ *
22
+ * @param number The number to clamp
23
+ * @param lower The lower bound of the clamp range
24
+ * @param upper The upper bound of the clamp range
25
+ * @returns The clamped value guaranteed to be within the provided range.
26
+ * @category Rounding
27
+ * @tags non-standard, clamp
28
+ */
29
+ function clamp(number, lower, upper) {
30
+ return (0, max_js_1.max)(lower, (0, min_js_1.min)(number, upper));
31
+ }
32
+ //# sourceMappingURL=clamp.js.map