
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
4e+283)
(*
(+ x -2.0)
(/
(fma
(fma (fma (fma x 4.16438922228 78.6994924154) x 137.519416416) x y)
x
z)
(fma
(fma (fma (+ x 43.3400022514) x 263.505074721) x 313.399215894)
x
47.066876606)))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 4e+283) {
tmp = (x + -2.0) * (fma(fma(fma(fma(x, 4.16438922228, 78.6994924154), x, 137.519416416), x, y), x, z) / fma(fma(fma((x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 4e+283) tmp = Float64(Float64(x + -2.0) * Float64(fma(fma(fma(fma(x, 4.16438922228, 78.6994924154), x, 137.519416416), x, y), x, z) / fma(fma(fma(Float64(x + 43.3400022514), x, 263.505074721), x, 313.399215894), x, 47.066876606))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], 4e+283], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(N[(N[(N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] * x + 137.519416416), $MachinePrecision] * x + y), $MachinePrecision] * x + z), $MachinePrecision] / N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x + 263.505074721), $MachinePrecision] * x + 313.399215894), $MachinePrecision] * x + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 4 \cdot 10^{+283}:\\
\;\;\;\;\left(x + -2\right) \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), x, 137.519416416\right), x, y\right), x, z\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < 3.99999999999999982e283Initial program 97.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-define99.5%
fma-define99.5%
fma-define99.5%
fma-define99.5%
fma-define99.5%
fma-define99.6%
fma-define99.6%
Simplified99.6%
if 3.99999999999999982e283 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) Initial program 0.2%
associate-/l*2.8%
sub-neg2.8%
metadata-eval2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
Simplified2.8%
Taylor expanded in x around -inf 99.1%
mul-1-neg99.1%
unsub-neg99.1%
mul-1-neg99.1%
unsub-neg99.1%
mul-1-neg99.1%
unsub-neg99.1%
mul-1-neg99.1%
unsub-neg99.1%
Simplified99.1%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(t_1
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) 4e+283)
(* (+ x -2.0) (+ (/ z t_0) (/ t_1 t_0)))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x))))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))));
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 4e+283) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
t_1 = x * (y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0))))))
if ((((x - 2.0d0) * (t_1 + z)) / t_0) <= 4d+283) then
tmp = (x + (-2.0d0)) * ((z / t_0) + (t_1 / t_0))
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))));
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 4e+283) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))) tmp = 0 if (((x - 2.0) * (t_1 + z)) / t_0) <= 4e+283: tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)) else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) t_1 = Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) <= 4e+283) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(t_1 / t_0))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; t_1 = x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228)))))); tmp = 0.0; if ((((x - 2.0) * (t_1 + z)) / t_0) <= 4e+283) tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)); else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(t$95$1 + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 4e+283], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z / t$95$0), $MachinePrecision] + N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
t_1 := x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t\_1 + z\right)}{t\_0} \leq 4 \cdot 10^{+283}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t\_0} + \frac{t\_1}{t\_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < 3.99999999999999982e283Initial program 97.6%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
fma-define99.5%
fma-define99.5%
fma-define99.5%
fma-define99.5%
fma-define99.5%
fma-define99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in z around 0 99.5%
if 3.99999999999999982e283 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) Initial program 0.2%
associate-/l*2.8%
sub-neg2.8%
metadata-eval2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
Simplified2.8%
Taylor expanded in x around -inf 99.1%
mul-1-neg99.1%
unsub-neg99.1%
mul-1-neg99.1%
unsub-neg99.1%
mul-1-neg99.1%
unsub-neg99.1%
mul-1-neg99.1%
unsub-neg99.1%
Simplified99.1%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
y
(*
x
(+ 137.519416416 (* x (+ 78.6994924154 (* x 4.16438922228)))))))
z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (<= t_0 4e+283)
t_0
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x))))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 4e+283) {
tmp = t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((x - 2.0d0) * ((x * (y + (x * (137.519416416d0 + (x * (78.6994924154d0 + (x * 4.16438922228d0))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 4d+283) then
tmp = t_0
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 4e+283) {
tmp = t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if t_0 <= 4e+283: tmp = t_0 else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + Float64(x * 4.16438922228))))))) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) tmp = 0.0 if (t_0 <= 4e+283) tmp = t_0; else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * ((x * (y + (x * (137.519416416 + (x * (78.6994924154 + (x * 4.16438922228))))))) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if (t_0 <= 4e+283) tmp = t_0; else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[(x * 4.16438922228), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 4e+283], t$95$0, N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + x \cdot 4.16438922228\right)\right)\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{if}\;t\_0 \leq 4 \cdot 10^{+283}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < 3.99999999999999982e283Initial program 97.6%
if 3.99999999999999982e283 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) Initial program 0.2%
associate-/l*2.8%
sub-neg2.8%
metadata-eval2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
Simplified2.8%
Taylor expanded in x around -inf 99.1%
mul-1-neg99.1%
unsub-neg99.1%
mul-1-neg99.1%
unsub-neg99.1%
mul-1-neg99.1%
unsub-neg99.1%
mul-1-neg99.1%
unsub-neg99.1%
Simplified99.1%
Final simplification98.3%
(FPCore (x y z)
:precision binary64
(if (or (<= x -0.23) (not (<= x 0.008)))
(*
(+ x -2.0)
(*
y
(+
(* 4.16438922228 (/ 1.0 y))
(/
x
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))))
(/
(* (- x 2.0) (+ z (* x (+ y (* x (+ 137.519416416 (* x 78.6994924154)))))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -0.23) || !(x <= 0.008)) {
tmp = (x + -2.0) * (y * ((4.16438922228 * (1.0 / y)) + (x / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-0.23d0)) .or. (.not. (x <= 0.008d0))) then
tmp = (x + (-2.0d0)) * (y * ((4.16438922228d0 * (1.0d0 / y)) + (x / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0))))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * (137.519416416d0 + (x * 78.6994924154d0))))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -0.23) || !(x <= 0.008)) {
tmp = (x + -2.0) * (y * ((4.16438922228 * (1.0 / y)) + (x / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -0.23) or not (x <= 0.008): tmp = (x + -2.0) * (y * ((4.16438922228 * (1.0 / y)) + (x / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)))) else: tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -0.23) || !(x <= 0.008)) tmp = Float64(Float64(x + -2.0) * Float64(y * Float64(Float64(4.16438922228 * Float64(1.0 / y)) + Float64(x / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606))))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * 78.6994924154))))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -0.23) || ~((x <= 0.008))) tmp = (x + -2.0) * (y * ((4.16438922228 * (1.0 / y)) + (x / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)))); else tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -0.23], N[Not[LessEqual[x, 0.008]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(y * N[(N[(4.16438922228 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision] + N[(x / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.23 \lor \neg \left(x \leq 0.008\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(y \cdot \left(4.16438922228 \cdot \frac{1}{y} + \frac{x}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot 78.6994924154\right)\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\end{array}
\end{array}
if x < -0.23000000000000001 or 0.0080000000000000002 < x Initial program 12.5%
associate-/l*17.0%
sub-neg17.0%
metadata-eval17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
Simplified17.0%
Taylor expanded in y around inf 14.0%
Taylor expanded in x around inf 97.0%
Taylor expanded in z around 0 95.0%
if -0.23000000000000001 < x < 0.0080000000000000002Initial program 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification97.4%
(FPCore (x y z)
:precision binary64
(if (or (<= x -3.1e+15) (not (<= x 2.8e+27)))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(* x (+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3.1e+15) || !(x <= 2.8e+27)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-3.1d+15)) .or. (.not. (x <= 2.8d+27))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -3.1e+15) || !(x <= 2.8e+27)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -3.1e+15) or not (x <= 2.8e+27): tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -3.1e+15) || !(x <= 2.8e+27)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -3.1e+15) || ~((x <= 2.8e+27))) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -3.1e+15], N[Not[LessEqual[x, 2.8e+27]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.1 \cdot 10^{+15} \lor \neg \left(x \leq 2.8 \cdot 10^{+27}\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\end{array}
\end{array}
if x < -3.1e15 or 2.7999999999999999e27 < x Initial program 9.1%
associate-/l*13.0%
sub-neg13.0%
metadata-eval13.0%
fma-define13.0%
fma-define13.0%
fma-define13.0%
fma-define13.0%
fma-define13.0%
fma-define13.0%
fma-define13.0%
Simplified13.0%
Taylor expanded in x around -inf 97.9%
mul-1-neg97.9%
unsub-neg97.9%
mul-1-neg97.9%
unsub-neg97.9%
mul-1-neg97.9%
unsub-neg97.9%
mul-1-neg97.9%
unsub-neg97.9%
Simplified97.9%
if -3.1e15 < x < 2.7999999999999999e27Initial program 98.9%
Taylor expanded in x around 0 98.6%
*-commutative95.5%
Simplified98.6%
Final simplification98.3%
(FPCore (x y z)
:precision binary64
(if (or (<= x -5.2) (not (<= x 41.0)))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))
(/
(* (- x 2.0) (+ z (* x (+ y (* x (+ 137.519416416 (* x 78.6994924154)))))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.2) || !(x <= 41.0)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-5.2d0)) .or. (.not. (x <= 41.0d0))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * (137.519416416d0 + (x * 78.6994924154d0))))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -5.2) || !(x <= 41.0)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.2) or not (x <= 41.0): tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) else: tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.2) || !(x <= 41.0)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * 78.6994924154))))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.2) || ~((x <= 41.0))) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); else tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.2], N[Not[LessEqual[x, 41.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \lor \neg \left(x \leq 41\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot 78.6994924154\right)\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\end{array}
\end{array}
if x < -5.20000000000000018 or 41 < x Initial program 12.5%
associate-/l*17.0%
sub-neg17.0%
metadata-eval17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
Simplified17.0%
Taylor expanded in x around -inf 94.4%
mul-1-neg94.4%
unsub-neg94.4%
mul-1-neg94.4%
unsub-neg94.4%
mul-1-neg94.4%
unsub-neg94.4%
mul-1-neg94.4%
unsub-neg94.4%
Simplified94.4%
if -5.20000000000000018 < x < 41Initial program 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification97.1%
(FPCore (x y z)
:precision binary64
(if (or (<= x -5.2) (not (<= x 100.0)))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.2) || !(x <= 100.0)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-5.2d0)) .or. (.not. (x <= 100.0d0))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -5.2) || !(x <= 100.0)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.2) or not (x <= 100.0): tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.2) || !(x <= 100.0)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.2) || ~((x <= 100.0))) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.2], N[Not[LessEqual[x, 100.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \lor \neg \left(x \leq 100\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\end{array}
\end{array}
if x < -5.20000000000000018 or 100 < x Initial program 12.5%
associate-/l*17.0%
sub-neg17.0%
metadata-eval17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
fma-define17.0%
Simplified17.0%
Taylor expanded in x around -inf 94.4%
mul-1-neg94.4%
unsub-neg94.4%
mul-1-neg94.4%
unsub-neg94.4%
mul-1-neg94.4%
unsub-neg94.4%
mul-1-neg94.4%
unsub-neg94.4%
Simplified94.4%
if -5.20000000000000018 < x < 100Initial program 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.5%
*-commutative99.5%
Simplified99.5%
Final simplification97.0%
(FPCore (x y z)
:precision binary64
(if (or (<= x -5.5) (not (<= x 1.65)))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))
(+
(* z -0.0424927283095952)
(* x (+ (* y -0.0424927283095952) (* z 0.3041881842569256))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.5) || !(x <= 1.65)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else {
tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-5.5d0)) .or. (.not. (x <= 1.65d0))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
else
tmp = (z * (-0.0424927283095952d0)) + (x * ((y * (-0.0424927283095952d0)) + (z * 0.3041881842569256d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -5.5) || !(x <= 1.65)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else {
tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.5) or not (x <= 1.65): tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) else: tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.5) || !(x <= 1.65)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); else tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(y * -0.0424927283095952) + Float64(z * 0.3041881842569256)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.5) || ~((x <= 1.65))) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); else tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.5], N[Not[LessEqual[x, 1.65]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(y * -0.0424927283095952), $MachinePrecision] + N[(z * 0.3041881842569256), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \lor \neg \left(x \leq 1.65\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 + z \cdot 0.3041881842569256\right)\\
\end{array}
\end{array}
if x < -5.5 or 1.6499999999999999 < x Initial program 11.9%
associate-/l*16.4%
sub-neg16.4%
metadata-eval16.4%
fma-define16.4%
fma-define16.4%
fma-define16.4%
fma-define16.4%
fma-define16.4%
fma-define16.4%
fma-define16.4%
Simplified16.4%
Taylor expanded in x around -inf 95.0%
mul-1-neg95.0%
unsub-neg95.0%
mul-1-neg95.0%
unsub-neg95.0%
mul-1-neg95.0%
unsub-neg95.0%
mul-1-neg95.0%
unsub-neg95.0%
Simplified95.0%
if -5.5 < x < 1.6499999999999999Initial program 99.7%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in x around 0 92.9%
pow192.9%
cancel-sign-sub-inv92.9%
fma-define92.9%
+-commutative92.9%
fma-define92.9%
metadata-eval92.9%
Applied egg-rr92.9%
unpow192.9%
fma-undefine92.9%
fma-undefine92.9%
+-commutative92.9%
metadata-eval92.9%
cancel-sign-sub-inv92.9%
sub-neg92.9%
distribute-lft-in92.9%
+-commutative92.9%
associate-+l+92.9%
associate-*r*92.9%
metadata-eval92.9%
sub-neg92.9%
distribute-rgt-out--92.9%
metadata-eval92.9%
Simplified92.9%
Final simplification93.9%
(FPCore (x y z) :precision binary64 (if (or (<= x -1900.0) (not (<= x 5.5e+37))) (* x 4.16438922228) (* (+ x -2.0) (+ (* z 0.0212463641547976) (* 0.0212463641547976 (* x y))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1900.0) || !(x <= 5.5e+37)) {
tmp = x * 4.16438922228;
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (0.0212463641547976 * (x * y)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1900.0d0)) .or. (.not. (x <= 5.5d+37))) then
tmp = x * 4.16438922228d0
else
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (0.0212463641547976d0 * (x * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1900.0) || !(x <= 5.5e+37)) {
tmp = x * 4.16438922228;
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (0.0212463641547976 * (x * y)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1900.0) or not (x <= 5.5e+37): tmp = x * 4.16438922228 else: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (0.0212463641547976 * (x * y))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1900.0) || !(x <= 5.5e+37)) tmp = Float64(x * 4.16438922228); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(0.0212463641547976 * Float64(x * y)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1900.0) || ~((x <= 5.5e+37))) tmp = x * 4.16438922228; else tmp = (x + -2.0) * ((z * 0.0212463641547976) + (0.0212463641547976 * (x * y))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1900.0], N[Not[LessEqual[x, 5.5e+37]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(0.0212463641547976 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1900 \lor \neg \left(x \leq 5.5 \cdot 10^{+37}\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + 0.0212463641547976 \cdot \left(x \cdot y\right)\right)\\
\end{array}
\end{array}
if x < -1900 or 5.50000000000000016e37 < x Initial program 8.4%
associate-/l*12.3%
sub-neg12.3%
metadata-eval12.3%
fma-define12.3%
fma-define12.3%
fma-define12.3%
fma-define12.4%
fma-define12.4%
fma-define12.4%
fma-define12.4%
Simplified12.4%
Taylor expanded in x around inf 96.2%
Taylor expanded in x around inf 96.2%
if -1900 < x < 5.50000000000000016e37Initial program 98.2%
associate-/l*98.9%
sub-neg98.9%
metadata-eval98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
fma-define99.0%
fma-define99.0%
Simplified99.0%
Taylor expanded in x around 0 88.3%
Taylor expanded in y around 0 88.2%
Taylor expanded in z around 0 88.2%
Final simplification92.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -190.0) (not (<= x 5.5e+37))) (* x 4.16438922228) (* (+ x -2.0) (+ (* z 0.0212463641547976) (* y (* x 0.0212463641547976))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -190.0) || !(x <= 5.5e+37)) {
tmp = x * 4.16438922228;
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-190.0d0)) .or. (.not. (x <= 5.5d+37))) then
tmp = x * 4.16438922228d0
else
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (y * (x * 0.0212463641547976d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -190.0) || !(x <= 5.5e+37)) {
tmp = x * 4.16438922228;
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -190.0) or not (x <= 5.5e+37): tmp = x * 4.16438922228 else: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -190.0) || !(x <= 5.5e+37)) tmp = Float64(x * 4.16438922228); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(y * Float64(x * 0.0212463641547976)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -190.0) || ~((x <= 5.5e+37))) tmp = x * 4.16438922228; else tmp = (x + -2.0) * ((z * 0.0212463641547976) + (y * (x * 0.0212463641547976))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -190.0], N[Not[LessEqual[x, 5.5e+37]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(y * N[(x * 0.0212463641547976), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -190 \lor \neg \left(x \leq 5.5 \cdot 10^{+37}\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + y \cdot \left(x \cdot 0.0212463641547976\right)\right)\\
\end{array}
\end{array}
if x < -190 or 5.50000000000000016e37 < x Initial program 8.4%
associate-/l*12.3%
sub-neg12.3%
metadata-eval12.3%
fma-define12.3%
fma-define12.3%
fma-define12.3%
fma-define12.4%
fma-define12.4%
fma-define12.4%
fma-define12.4%
Simplified12.4%
Taylor expanded in x around inf 96.2%
Taylor expanded in x around inf 96.2%
if -190 < x < 5.50000000000000016e37Initial program 98.2%
associate-/l*98.9%
sub-neg98.9%
metadata-eval98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
fma-define98.9%
fma-define99.0%
fma-define99.0%
Simplified99.0%
Taylor expanded in x around 0 88.3%
Taylor expanded in y around 0 88.2%
Taylor expanded in z around 0 88.2%
associate-*r*88.3%
*-commutative88.3%
*-commutative88.3%
Simplified88.3%
Final simplification92.0%
(FPCore (x y z)
:precision binary64
(if (<= x -680.0)
(* x 4.16438922228)
(if (<= x 8e-12)
(+
(* z -0.0424927283095952)
(* x (+ (* y -0.0424927283095952) (* z 0.3041881842569256))))
(* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -680.0) {
tmp = x * 4.16438922228;
} else if (x <= 8e-12) {
tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256)));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-680.0d0)) then
tmp = x * 4.16438922228d0
else if (x <= 8d-12) then
tmp = (z * (-0.0424927283095952d0)) + (x * ((y * (-0.0424927283095952d0)) + (z * 0.3041881842569256d0)))
else
tmp = 4.16438922228d0 * (x + (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -680.0) {
tmp = x * 4.16438922228;
} else if (x <= 8e-12) {
tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256)));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -680.0: tmp = x * 4.16438922228 elif x <= 8e-12: tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -680.0) tmp = Float64(x * 4.16438922228); elseif (x <= 8e-12) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(y * -0.0424927283095952) + Float64(z * 0.3041881842569256)))); else tmp = Float64(4.16438922228 * Float64(x + -2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -680.0) tmp = x * 4.16438922228; elseif (x <= 8e-12) tmp = (z * -0.0424927283095952) + (x * ((y * -0.0424927283095952) + (z * 0.3041881842569256))); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -680.0], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 8e-12], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(y * -0.0424927283095952), $MachinePrecision] + N[(z * 0.3041881842569256), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -680:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-12}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952 + z \cdot 0.3041881842569256\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -680Initial program 8.5%
associate-/l*11.7%
sub-neg11.7%
metadata-eval11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
Simplified11.7%
Taylor expanded in x around inf 95.9%
Taylor expanded in x around inf 95.9%
if -680 < x < 7.99999999999999984e-12Initial program 99.7%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in x around 0 93.6%
pow193.6%
cancel-sign-sub-inv93.6%
fma-define93.6%
+-commutative93.6%
fma-define93.6%
metadata-eval93.6%
Applied egg-rr93.6%
unpow193.6%
fma-undefine93.6%
fma-undefine93.6%
+-commutative93.6%
metadata-eval93.6%
cancel-sign-sub-inv93.6%
sub-neg93.6%
distribute-lft-in93.6%
+-commutative93.6%
associate-+l+93.6%
associate-*r*93.6%
metadata-eval93.6%
sub-neg93.6%
distribute-rgt-out--93.6%
metadata-eval93.6%
Simplified93.6%
if 7.99999999999999984e-12 < x Initial program 16.1%
associate-/l*21.6%
sub-neg21.6%
metadata-eval21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
Simplified21.6%
Taylor expanded in x around inf 85.9%
Final simplification92.0%
(FPCore (x y z)
:precision binary64
(if (<= x -255000.0)
(* x 4.16438922228)
(if (<= x 8e-12)
(+ (* z -0.0424927283095952) (* -0.0424927283095952 (* x y)))
(* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -255000.0) {
tmp = x * 4.16438922228;
} else if (x <= 8e-12) {
tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-255000.0d0)) then
tmp = x * 4.16438922228d0
else if (x <= 8d-12) then
tmp = (z * (-0.0424927283095952d0)) + ((-0.0424927283095952d0) * (x * y))
else
tmp = 4.16438922228d0 * (x + (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -255000.0) {
tmp = x * 4.16438922228;
} else if (x <= 8e-12) {
tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -255000.0: tmp = x * 4.16438922228 elif x <= 8e-12: tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y)) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -255000.0) tmp = Float64(x * 4.16438922228); elseif (x <= 8e-12) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(-0.0424927283095952 * Float64(x * y))); else tmp = Float64(4.16438922228 * Float64(x + -2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -255000.0) tmp = x * 4.16438922228; elseif (x <= 8e-12) tmp = (z * -0.0424927283095952) + (-0.0424927283095952 * (x * y)); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -255000.0], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 8e-12], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -255000:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-12}:\\
\;\;\;\;z \cdot -0.0424927283095952 + -0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -255000Initial program 8.5%
associate-/l*11.7%
sub-neg11.7%
metadata-eval11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
Simplified11.7%
Taylor expanded in x around inf 95.9%
Taylor expanded in x around inf 95.9%
if -255000 < x < 7.99999999999999984e-12Initial program 99.7%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in x around 0 93.6%
Taylor expanded in z around 0 93.4%
if 7.99999999999999984e-12 < x Initial program 16.1%
associate-/l*21.6%
sub-neg21.6%
metadata-eval21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
Simplified21.6%
Taylor expanded in x around inf 85.9%
Final simplification91.9%
(FPCore (x y z)
:precision binary64
(if (<= x -1650.0)
(* x 4.16438922228)
(if (<= x 8e-12)
(+ (* z -0.0424927283095952) (* x (* y -0.0424927283095952)))
(* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1650.0) {
tmp = x * 4.16438922228;
} else if (x <= 8e-12) {
tmp = (z * -0.0424927283095952) + (x * (y * -0.0424927283095952));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1650.0d0)) then
tmp = x * 4.16438922228d0
else if (x <= 8d-12) then
tmp = (z * (-0.0424927283095952d0)) + (x * (y * (-0.0424927283095952d0)))
else
tmp = 4.16438922228d0 * (x + (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1650.0) {
tmp = x * 4.16438922228;
} else if (x <= 8e-12) {
tmp = (z * -0.0424927283095952) + (x * (y * -0.0424927283095952));
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1650.0: tmp = x * 4.16438922228 elif x <= 8e-12: tmp = (z * -0.0424927283095952) + (x * (y * -0.0424927283095952)) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1650.0) tmp = Float64(x * 4.16438922228); elseif (x <= 8e-12) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(y * -0.0424927283095952))); else tmp = Float64(4.16438922228 * Float64(x + -2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1650.0) tmp = x * 4.16438922228; elseif (x <= 8e-12) tmp = (z * -0.0424927283095952) + (x * (y * -0.0424927283095952)); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1650.0], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 8e-12], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(y * -0.0424927283095952), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1650:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-12}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(y \cdot -0.0424927283095952\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -1650Initial program 8.5%
associate-/l*11.7%
sub-neg11.7%
metadata-eval11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
Simplified11.7%
Taylor expanded in x around inf 95.9%
Taylor expanded in x around inf 95.9%
if -1650 < x < 7.99999999999999984e-12Initial program 99.7%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in x around 0 93.6%
Taylor expanded in z around 0 93.4%
*-commutative93.4%
associate-*l*93.5%
*-commutative93.5%
Simplified93.5%
if 7.99999999999999984e-12 < x Initial program 16.1%
associate-/l*21.6%
sub-neg21.6%
metadata-eval21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
Simplified21.6%
Taylor expanded in x around inf 85.9%
Final simplification92.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -210.0) (not (<= x 6.5e+33))) (* x 4.16438922228) (* (+ x -2.0) (* z 0.0212463641547976))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -210.0) || !(x <= 6.5e+33)) {
tmp = x * 4.16438922228;
} else {
tmp = (x + -2.0) * (z * 0.0212463641547976);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-210.0d0)) .or. (.not. (x <= 6.5d+33))) then
tmp = x * 4.16438922228d0
else
tmp = (x + (-2.0d0)) * (z * 0.0212463641547976d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -210.0) || !(x <= 6.5e+33)) {
tmp = x * 4.16438922228;
} else {
tmp = (x + -2.0) * (z * 0.0212463641547976);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -210.0) or not (x <= 6.5e+33): tmp = x * 4.16438922228 else: tmp = (x + -2.0) * (z * 0.0212463641547976) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -210.0) || !(x <= 6.5e+33)) tmp = Float64(x * 4.16438922228); else tmp = Float64(Float64(x + -2.0) * Float64(z * 0.0212463641547976)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -210.0) || ~((x <= 6.5e+33))) tmp = x * 4.16438922228; else tmp = (x + -2.0) * (z * 0.0212463641547976); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -210.0], N[Not[LessEqual[x, 6.5e+33]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -210 \lor \neg \left(x \leq 6.5 \cdot 10^{+33}\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\
\end{array}
\end{array}
if x < -210 or 6.49999999999999993e33 < x Initial program 8.4%
associate-/l*12.3%
sub-neg12.3%
metadata-eval12.3%
fma-define12.3%
fma-define12.3%
fma-define12.3%
fma-define12.3%
fma-define12.3%
fma-define12.3%
fma-define12.3%
Simplified12.3%
Taylor expanded in x around inf 95.5%
Taylor expanded in x around inf 95.5%
if -210 < x < 6.49999999999999993e33Initial program 98.9%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.7%
Simplified99.7%
Taylor expanded in x around 0 63.9%
Final simplification78.8%
(FPCore (x y z) :precision binary64 (if (<= x -5.5) (* x 4.16438922228) (if (<= x 8e-12) (* z -0.0424927283095952) (* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.5) {
tmp = x * 4.16438922228;
} else if (x <= 8e-12) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-5.5d0)) then
tmp = x * 4.16438922228d0
else if (x <= 8d-12) then
tmp = z * (-0.0424927283095952d0)
else
tmp = 4.16438922228d0 * (x + (-2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -5.5) {
tmp = x * 4.16438922228;
} else if (x <= 8e-12) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.5: tmp = x * 4.16438922228 elif x <= 8e-12: tmp = z * -0.0424927283095952 else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -5.5) tmp = Float64(x * 4.16438922228); elseif (x <= 8e-12) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(4.16438922228 * Float64(x + -2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -5.5) tmp = x * 4.16438922228; elseif (x <= 8e-12) tmp = z * -0.0424927283095952; else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -5.5], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 8e-12], N[(z * -0.0424927283095952), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-12}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -5.5Initial program 8.5%
associate-/l*11.7%
sub-neg11.7%
metadata-eval11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
fma-define11.7%
Simplified11.7%
Taylor expanded in x around inf 95.9%
Taylor expanded in x around inf 95.9%
if -5.5 < x < 7.99999999999999984e-12Initial program 99.7%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in x around 0 67.0%
*-commutative67.0%
Simplified67.0%
if 7.99999999999999984e-12 < x Initial program 16.1%
associate-/l*21.6%
sub-neg21.6%
metadata-eval21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
fma-define21.6%
Simplified21.6%
Taylor expanded in x around inf 85.9%
Final simplification78.8%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.5) (not (<= x 110.0))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.5) || !(x <= 110.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-5.5d0)) .or. (.not. (x <= 110.0d0))) then
tmp = x * 4.16438922228d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -5.5) || !(x <= 110.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.5) or not (x <= 110.0): tmp = x * 4.16438922228 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.5) || !(x <= 110.0)) tmp = Float64(x * 4.16438922228); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.5) || ~((x <= 110.0))) tmp = x * 4.16438922228; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.5], N[Not[LessEqual[x, 110.0]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \lor \neg \left(x \leq 110\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -5.5 or 110 < x Initial program 11.2%
associate-/l*15.7%
sub-neg15.7%
metadata-eval15.7%
fma-define15.7%
fma-define15.7%
fma-define15.7%
fma-define15.8%
fma-define15.8%
fma-define15.8%
fma-define15.8%
Simplified15.8%
Taylor expanded in x around inf 91.8%
Taylor expanded in x around inf 91.8%
if -5.5 < x < 110Initial program 99.6%
associate-/l*99.6%
sub-neg99.6%
metadata-eval99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.6%
fma-define99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in x around 0 66.0%
*-commutative66.0%
Simplified66.0%
Final simplification78.7%
(FPCore (x y z) :precision binary64 (* x 4.16438922228))
double code(double x, double y, double z) {
return x * 4.16438922228;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * 4.16438922228d0
end function
public static double code(double x, double y, double z) {
return x * 4.16438922228;
}
def code(x, y, z): return x * 4.16438922228
function code(x, y, z) return Float64(x * 4.16438922228) end
function tmp = code(x, y, z) tmp = x * 4.16438922228; end
code[x_, y_, z_] := N[(x * 4.16438922228), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 4.16438922228
\end{array}
Initial program 56.1%
associate-/l*58.3%
sub-neg58.3%
metadata-eval58.3%
fma-define58.3%
fma-define58.3%
fma-define58.3%
fma-define58.3%
fma-define58.3%
fma-define58.4%
fma-define58.4%
Simplified58.4%
Taylor expanded in x around inf 47.1%
Taylor expanded in x around inf 46.9%
Final simplification46.9%
(FPCore (x y z) :precision binary64 -8.32877844456)
double code(double x, double y, double z) {
return -8.32877844456;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = -8.32877844456d0
end function
public static double code(double x, double y, double z) {
return -8.32877844456;
}
def code(x, y, z): return -8.32877844456
function code(x, y, z) return -8.32877844456 end
function tmp = code(x, y, z) tmp = -8.32877844456; end
code[x_, y_, z_] := -8.32877844456
\begin{array}{l}
\\
-8.32877844456
\end{array}
Initial program 56.1%
associate-/l*58.3%
sub-neg58.3%
metadata-eval58.3%
fma-define58.3%
fma-define58.3%
fma-define58.3%
fma-define58.3%
fma-define58.3%
fma-define58.4%
fma-define58.4%
Simplified58.4%
Taylor expanded in x around inf 47.1%
Taylor expanded in x around 0 3.3%
Final simplification3.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(if (< x -3.326128725870005e+62)
t_0
(if (< x 9.429991714554673e+55)
(*
(/ (- x 2.0) 1.0)
(/
(+
(*
(+
(* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x)
y)
x)
z)
(+
(*
(+
(+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x))))
313.399215894)
x)
47.066876606)))
t_0))))
double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = ((y / (x * x)) + (4.16438922228d0 * x)) - 110.1139242984811d0
if (x < (-3.326128725870005d+62)) then
tmp = t_0
else if (x < 9.429991714554673d+55) then
tmp = ((x - 2.0d0) / 1.0d0) * (((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z) / (((((263.505074721d0 * x) + ((43.3400022514d0 * (x * x)) + (x * (x * x)))) + 313.399215894d0) * x) + 47.066876606d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811 tmp = 0 if x < -3.326128725870005e+62: tmp = t_0 elif x < 9.429991714554673e+55: tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / Float64(x * x)) + Float64(4.16438922228 * x)) - 110.1139242984811) tmp = 0.0 if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = Float64(Float64(Float64(x - 2.0) / 1.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / Float64(Float64(Float64(Float64(Float64(263.505074721 * x) + Float64(Float64(43.3400022514 * Float64(x * x)) + Float64(x * Float64(x * x)))) + 313.399215894) * x) + 47.066876606))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811; tmp = 0.0; if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(4.16438922228 * x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[Less[x, -3.326128725870005e+62], t$95$0, If[Less[x, 9.429991714554673e+55], N[(N[(N[(x - 2.0), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision] / N[(N[(N[(N[(N[(263.505074721 * x), $MachinePrecision] + N[(N[(43.3400022514 * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\
\mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x < 9.429991714554673 \cdot 10^{+55}:\\
\;\;\;\;\frac{x - 2}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024074
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
:precision binary64
:alt
(if (< x -3.326128725870005e+62) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811) (if (< x 9.429991714554673e+55) (* (/ (- x 2.0) 1.0) (/ (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z) (+ (* (+ (+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x)))) 313.399215894) x) 47.066876606))) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(/ (* (- x 2.0) (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x) 47.066876606)))