2013-04-16 13:47:10 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
2012-05-21 04:12:37 -07:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-06-19 17:59:46 -07:00
|
|
|
#ifndef jsmath_h
|
|
|
|
#define jsmath_h
|
2010-10-06 12:13:20 -07:00
|
|
|
|
2013-06-23 04:21:01 -07:00
|
|
|
#include "mozilla/MemoryReporting.h"
|
|
|
|
|
2013-09-01 21:51:02 -07:00
|
|
|
#include "NamespaceImports.h"
|
2013-03-15 02:29:02 -07:00
|
|
|
|
2014-02-04 07:11:54 -08:00
|
|
|
#ifndef M_PI
|
|
|
|
# define M_PI 3.14159265358979323846
|
|
|
|
#endif
|
|
|
|
#ifndef M_E
|
|
|
|
# define M_E 2.7182818284590452354
|
|
|
|
#endif
|
|
|
|
#ifndef M_LOG2E
|
|
|
|
# define M_LOG2E 1.4426950408889634074
|
|
|
|
#endif
|
|
|
|
#ifndef M_LOG10E
|
|
|
|
# define M_LOG10E 0.43429448190325182765
|
|
|
|
#endif
|
|
|
|
#ifndef M_LN2
|
|
|
|
# define M_LN2 0.69314718055994530942
|
|
|
|
#endif
|
|
|
|
#ifndef M_LN10
|
|
|
|
# define M_LN10 2.30258509299404568402
|
|
|
|
#endif
|
|
|
|
#ifndef M_SQRT2
|
|
|
|
# define M_SQRT2 1.41421356237309504880
|
|
|
|
#endif
|
|
|
|
#ifndef M_SQRT1_2
|
|
|
|
# define M_SQRT1_2 0.70710678118654752440
|
|
|
|
#endif
|
|
|
|
|
2010-10-06 12:13:20 -07:00
|
|
|
namespace js {
|
|
|
|
|
|
|
|
typedef double (*UnaryFunType)(double);
|
|
|
|
|
|
|
|
class MathCache
|
|
|
|
{
|
2014-05-15 07:57:54 -07:00
|
|
|
public:
|
|
|
|
enum MathFuncId {
|
|
|
|
Zero,
|
|
|
|
Sin, Cos, Tan, Sinh, Cosh, Tanh, Asin, Acos, Atan, Asinh, Acosh, Atanh,
|
|
|
|
Sqrt, Log, Log10, Log2, Log1p, Exp, Expm1, Cbrt, Trunc, Sign
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
2010-10-06 12:13:20 -07:00
|
|
|
static const unsigned SizeLog2 = 12;
|
|
|
|
static const unsigned Size = 1 << SizeLog2;
|
2014-05-15 07:57:54 -07:00
|
|
|
struct Entry { double in; MathFuncId id; double out; };
|
2010-10-06 12:13:20 -07:00
|
|
|
Entry table[Size];
|
|
|
|
|
|
|
|
public:
|
|
|
|
MathCache();
|
|
|
|
|
2014-05-15 07:57:54 -07:00
|
|
|
unsigned hash(double x, MathFuncId id) {
|
Bug 708735 - Use <stdint.h> types in JSAPI and throughout SpiderMonkey. Continue to provide the {u,}int{8,16,32,64} and JS{Uint,Int}{8,16,32,64} integer types through a single header, however, for a simpler backout strategy -- and also to ease the transition for embedders. r=timeless on switching the jsd API to use the <stdint.h> types, r=luke, r=dmandelin
2011-12-08 19:54:10 -08:00
|
|
|
union { double d; struct { uint32_t one, two; } s; } u = { x };
|
|
|
|
uint32_t hash32 = u.s.one ^ u.s.two;
|
2014-05-15 07:57:54 -07:00
|
|
|
hash32 += uint32_t(id) << 8;
|
Bug 708735 - Use <stdint.h> types in JSAPI and throughout SpiderMonkey. Continue to provide the {u,}int{8,16,32,64} and JS{Uint,Int}{8,16,32,64} integer types through a single header, however, for a simpler backout strategy -- and also to ease the transition for embedders. r=timeless on switching the jsd API to use the <stdint.h> types, r=luke, r=dmandelin
2011-12-08 19:54:10 -08:00
|
|
|
uint16_t hash16 = uint16_t(hash32 ^ (hash32 >> 16));
|
2010-10-06 12:13:20 -07:00
|
|
|
return (hash16 & (Size - 1)) ^ (hash16 >> (16 - SizeLog2));
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* N.B. lookup uses double-equality. This is only safe if hash() maps +0
|
|
|
|
* and -0 to different table entries, which is asserted in MathCache().
|
|
|
|
*/
|
2014-05-15 07:57:54 -07:00
|
|
|
double lookup(UnaryFunType f, double x, MathFuncId id) {
|
|
|
|
unsigned index = hash(x, id);
|
2010-10-06 12:13:20 -07:00
|
|
|
Entry &e = table[index];
|
2014-05-15 07:57:54 -07:00
|
|
|
if (e.in == x && e.id == id)
|
2010-10-06 12:13:20 -07:00
|
|
|
return e.out;
|
|
|
|
e.in = x;
|
2014-05-15 07:57:54 -07:00
|
|
|
e.id = id;
|
2014-04-18 11:13:44 -07:00
|
|
|
return e.out = f(x);
|
2010-10-06 12:13:20 -07:00
|
|
|
}
|
2012-05-15 19:30:28 -07:00
|
|
|
|
2013-06-23 04:21:01 -07:00
|
|
|
size_t sizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf);
|
2010-10-06 12:13:20 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} /* namespace js */
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/*
|
|
|
|
* JS math functions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
extern JSObject *
|
2012-09-20 22:17:49 -07:00
|
|
|
js_InitMathClass(JSContext *cx, js::HandleObject obj);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2014-08-01 02:40:00 -07:00
|
|
|
namespace js {
|
|
|
|
|
2012-10-05 12:05:21 -07:00
|
|
|
extern double
|
|
|
|
math_random_no_outparam(JSContext *cx);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2014-08-01 02:40:00 -07:00
|
|
|
math_random(JSContext *cx, unsigned argc, js::Value *vp);
|
2012-10-05 12:05:21 -07:00
|
|
|
|
2014-07-04 05:17:20 -07:00
|
|
|
extern bool
|
2014-08-01 02:40:00 -07:00
|
|
|
math_abs_handle(JSContext *cx, js::HandleValue v, js::MutableHandleValue r);
|
2014-07-04 05:17:20 -07:00
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2014-08-01 02:40:00 -07:00
|
|
|
math_abs(JSContext *cx, unsigned argc, js::Value *vp);
|
2010-10-26 20:21:39 -07:00
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2014-08-01 02:40:00 -07:00
|
|
|
math_max(JSContext *cx, unsigned argc, js::Value *vp);
|
2009-08-19 15:31:10 -07:00
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2014-08-01 02:40:00 -07:00
|
|
|
math_min(JSContext *cx, unsigned argc, js::Value *vp);
|
2009-08-19 15:31:10 -07:00
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2014-08-01 02:40:00 -07:00
|
|
|
math_sqrt(JSContext *cx, unsigned argc, js::Value *vp);
|
2011-03-21 22:55:27 -07:00
|
|
|
|
2014-06-22 11:13:59 -07:00
|
|
|
extern bool
|
2014-08-01 02:40:00 -07:00
|
|
|
math_pow_handle(JSContext *cx, js::HandleValue base, js::HandleValue power,
|
|
|
|
js::MutableHandleValue result);
|
2014-06-22 11:13:59 -07:00
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2014-08-01 02:40:00 -07:00
|
|
|
math_pow(JSContext *cx, unsigned argc, js::Value *vp);
|
2011-03-21 22:55:27 -07:00
|
|
|
|
2014-07-02 06:05:51 -07:00
|
|
|
extern bool
|
2014-08-01 02:40:00 -07:00
|
|
|
minmax_impl(JSContext *cx, bool max, js::HandleValue a, js::HandleValue b,
|
|
|
|
js::MutableHandleValue res);
|
2012-06-15 04:27:04 -07:00
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2014-07-07 06:02:40 -07:00
|
|
|
math_sqrt_handle(JSContext *cx, js::HandleValue number, js::MutableHandleValue result);
|
|
|
|
|
|
|
|
extern bool
|
2012-12-14 10:28:14 -08:00
|
|
|
math_imul(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-12-12 11:23:29 -08:00
|
|
|
extern bool
|
2014-04-29 10:17:52 -07:00
|
|
|
RoundFloat32(JSContext *cx, HandleValue v, float *out);
|
|
|
|
|
|
|
|
extern bool
|
|
|
|
RoundFloat32(JSContext *cx, HandleValue arg, MutableHandleValue res);
|
2013-12-12 11:23:29 -08:00
|
|
|
|
2013-08-28 22:00:11 -07:00
|
|
|
extern bool
|
|
|
|
math_fround(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2012-06-15 04:27:04 -07:00
|
|
|
math_log(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
math_log_impl(MathCache *cache, double x);
|
|
|
|
|
2013-08-22 07:33:35 -07:00
|
|
|
extern double
|
|
|
|
math_log_uncached(double x);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2012-06-15 04:27:04 -07:00
|
|
|
math_sin(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
|
|
|
extern double
|
2014-04-23 14:44:01 -07:00
|
|
|
math_sin_impl(MathCache *cache, double x);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
math_sin_uncached(double x);
|
2013-08-22 07:33:35 -07:00
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2012-06-15 04:27:04 -07:00
|
|
|
math_cos(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
|
|
|
extern double
|
2014-04-23 14:44:01 -07:00
|
|
|
math_cos_impl(MathCache *cache, double x);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
math_cos_uncached(double x);
|
2013-08-22 07:33:35 -07:00
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-03-03 15:56:58 -08:00
|
|
|
math_exp(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
math_exp_impl(MathCache *cache, double x);
|
|
|
|
|
2013-08-22 07:33:35 -07:00
|
|
|
extern double
|
|
|
|
math_exp_uncached(double x);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2012-06-15 04:27:04 -07:00
|
|
|
math_tan(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
math_tan_impl(MathCache *cache, double x);
|
|
|
|
|
2013-08-22 07:33:35 -07:00
|
|
|
extern double
|
|
|
|
math_tan_uncached(double x);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_log10(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_log2(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_log1p(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_expm1(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_cosh(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_sinh(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_tanh(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_acosh(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_asinh(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_atanh(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
|
|
|
ecmaHypot(double x, double y);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_hypot(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_trunc(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_sign(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-07-15 08:03:14 -07:00
|
|
|
math_cbrt(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-03-15 02:29:02 -07:00
|
|
|
math_asin(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-03-15 02:29:02 -07:00
|
|
|
math_acos(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-03-15 02:29:02 -07:00
|
|
|
math_atan(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
2014-07-15 14:19:00 -07:00
|
|
|
extern bool
|
|
|
|
math_atan2_handle(JSContext *cx, HandleValue y, HandleValue x, MutableHandleValue res);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-03-15 02:29:02 -07:00
|
|
|
math_atan2(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
ecmaAtan2(double x, double y);
|
|
|
|
|
2013-03-03 15:56:58 -08:00
|
|
|
extern double
|
|
|
|
math_atan_impl(MathCache *cache, double x);
|
|
|
|
|
2013-08-22 07:33:35 -07:00
|
|
|
extern double
|
|
|
|
math_atan_uncached(double x);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-03-03 15:56:58 -08:00
|
|
|
math_atan(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
math_asin_impl(MathCache *cache, double x);
|
|
|
|
|
2013-08-22 07:33:35 -07:00
|
|
|
extern double
|
|
|
|
math_asin_uncached(double x);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-03-03 15:56:58 -08:00
|
|
|
math_asin(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
math_acos_impl(MathCache *cache, double x);
|
|
|
|
|
2013-08-22 07:33:35 -07:00
|
|
|
extern double
|
|
|
|
math_acos_uncached(double x);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-03-03 15:56:58 -08:00
|
|
|
math_acos(JSContext *cx, unsigned argc, js::Value *vp);
|
|
|
|
|
2013-09-25 04:26:59 -07:00
|
|
|
extern bool
|
|
|
|
math_ceil(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
math_ceil_impl(double x);
|
|
|
|
|
2014-04-11 08:24:58 -07:00
|
|
|
extern bool
|
|
|
|
math_clz32(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
2014-06-22 11:14:00 -07:00
|
|
|
extern bool
|
|
|
|
math_floor_handle(JSContext *cx, HandleValue v, MutableHandleValue r);
|
|
|
|
|
2013-09-25 04:26:59 -07:00
|
|
|
extern bool
|
|
|
|
math_floor(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
math_floor_impl(double x);
|
|
|
|
|
2014-09-03 06:39:27 -07:00
|
|
|
template<typename T>
|
|
|
|
extern T GetBiggestNumberLessThan(T x);
|
|
|
|
|
2014-06-22 11:13:58 -07:00
|
|
|
extern bool
|
|
|
|
math_round_handle(JSContext *cx, HandleValue arg, MutableHandleValue res);
|
|
|
|
|
2013-09-25 04:26:59 -07:00
|
|
|
extern bool
|
|
|
|
math_round(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
math_round_impl(double x);
|
|
|
|
|
2014-02-28 03:07:40 -08:00
|
|
|
extern float
|
|
|
|
math_roundf_impl(float x);
|
|
|
|
|
2012-07-31 20:04:42 -07:00
|
|
|
extern double
|
|
|
|
powi(double x, int y);
|
|
|
|
|
|
|
|
extern double
|
|
|
|
ecmaPow(double x, double y);
|
|
|
|
|
2013-08-02 00:41:57 -07:00
|
|
|
extern bool
|
2013-03-15 02:29:02 -07:00
|
|
|
math_imul(JSContext *cx, unsigned argc, Value *vp);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_log10_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_log10_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_log2_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_log2_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_log1p_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_log1p_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_expm1_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_expm1_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_cosh_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_cosh_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_sinh_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_sinh_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_tanh_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_tanh_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_acosh_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_acosh_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_asinh_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_asinh_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_atanh_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_atanh_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_trunc_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_trunc_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_sign_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_sign_uncached(double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-07-15 08:03:14 -07:00
|
|
|
math_cbrt_impl(MathCache *cache, double x);
|
|
|
|
|
2013-10-31 07:06:13 -07:00
|
|
|
extern double
|
2013-08-22 07:33:35 -07:00
|
|
|
math_cbrt_uncached(double x);
|
|
|
|
|
2012-06-15 04:27:04 -07:00
|
|
|
} /* namespace js */
|
|
|
|
|
2013-06-19 17:59:46 -07:00
|
|
|
#endif /* jsmath_h */
|