
(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 19 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
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
INFINITY)
(*
(+ 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 (/ y (pow x 3.0))))))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= ((double) INFINITY)) {
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 + (y / pow(x, 3.0)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= Inf) 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(y / (x ^ 3.0)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $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], Infinity], 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[(y / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\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 \infty:\\
\;\;\;\;\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{y}{{x}^{3}}\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))) < +inf.0Initial program 94.7%
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-define98.9%
fma-define98.9%
Simplified98.9%
if +inf.0 < (/.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.0%
associate-/l*0.0%
sub-neg0.0%
metadata-eval0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in x around -inf 99.0%
mul-1-neg99.0%
unsub-neg99.0%
mul-1-neg99.0%
unsub-neg99.0%
mul-1-neg99.0%
unsub-neg99.0%
mul-1-neg99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in y around inf 99.1%
mul-1-neg99.1%
distribute-neg-frac299.1%
Simplified99.1%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
t_0)
5e+301)
(/
(*
(- x 2.0)
(+
z
(*
x
(+
y
(*
x
(+
137.519416416
(*
x
(+ 78.6994924154 (cbrt (* (pow x 3.0) 72.2194108904232))))))))))
t_0)
(* (+ x -2.0) (+ 4.16438922228 (/ y (pow x 3.0)))))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 5e+301) {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * (78.6994924154 + cbrt((pow(x, 3.0) * 72.2194108904232)))))))))) / t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (y / pow(x, 3.0)));
}
return tmp;
}
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 tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 5e+301) {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * (78.6994924154 + Math.cbrt((Math.pow(x, 3.0) * 72.2194108904232)))))))))) / t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (y / Math.pow(x, 3.0)));
}
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) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 5e+301) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * Float64(78.6994924154 + cbrt(Float64((x ^ 3.0) * 72.2194108904232)))))))))) / t_0); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(y / (x ^ 3.0)))); end return 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]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 5e+301], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * N[(78.6994924154 + N[Power[N[(N[Power[x, 3.0], $MachinePrecision] * 72.2194108904232), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(y / N[Power[x, 3.0], $MachinePrecision]), $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\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{t\_0} \leq 5 \cdot 10^{+301}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot \left(78.6994924154 + \sqrt[3]{{x}^{3} \cdot 72.2194108904232}\right)\right)\right)\right)}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{y}{{x}^{3}}\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))) < 5.0000000000000004e301Initial program 97.7%
add-cbrt-cube97.6%
pow1/379.0%
pow379.0%
unpow-prod-down79.0%
metadata-eval79.0%
Applied egg-rr79.0%
unpow1/397.7%
Simplified97.7%
if 5.0000000000000004e301 < (/.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*3.8%
sub-neg3.8%
metadata-eval3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
Simplified3.8%
Taylor expanded in x around -inf 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in y around inf 97.3%
mul-1-neg97.3%
distribute-neg-frac297.3%
Simplified97.3%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (<= t_0 5e+301)
t_0
(* (+ x -2.0) (+ 4.16438922228 (/ y (pow x 3.0)))))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+301) {
tmp = t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (y / pow(x, 3.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 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 5d+301) then
tmp = t_0
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (y / (x ** 3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+301) {
tmp = t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (y / Math.pow(x, 3.0)));
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if t_0 <= 5e+301: tmp = t_0 else: tmp = (x + -2.0) * (4.16438922228 + (y / math.pow(x, 3.0))) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + 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 <= 5e+301) tmp = t_0; else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(y / (x ^ 3.0)))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if (t_0 <= 5e+301) tmp = t_0; else tmp = (x + -2.0) * (4.16438922228 + (y / (x ^ 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $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, 5e+301], t$95$0, N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(y / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\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 5 \cdot 10^{+301}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{y}{{x}^{3}}\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))) < 5.0000000000000004e301Initial program 97.7%
if 5.0000000000000004e301 < (/.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*3.8%
sub-neg3.8%
metadata-eval3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
Simplified3.8%
Taylor expanded in x around -inf 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in y around inf 97.3%
mul-1-neg97.3%
distribute-neg-frac297.3%
Simplified97.3%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+
(* x (+ (* x (+ x 43.3400022514)) 263.505074721))
313.399215894))
47.066876606))))
(if (<= t_0 5e+301)
t_0
(*
(+ x -2.0)
(+
4.16438922228
(/ (- (/ (+ 3451.550173699799 (/ y x)) x) 101.7851458539211) x))))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+301) {
tmp = t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / 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 * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 5d+301) then
tmp = t_0
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + (y / 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 * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
double tmp;
if (t_0 <= 5e+301) {
tmp = t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) tmp = 0 if t_0 <= 5e+301: tmp = t_0 else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + 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 <= 5e+301) tmp = t_0; else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(y / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); tmp = 0.0; if (t_0 <= 5e+301) tmp = t_0; else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / 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[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $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, 5e+301], t$95$0, N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(y / 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(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\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 5 \cdot 10^{+301}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y}{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))) < 5.0000000000000004e301Initial program 97.7%
if 5.0000000000000004e301 < (/.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*3.8%
sub-neg3.8%
metadata-eval3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
fma-define3.8%
Simplified3.8%
Taylor expanded in x around -inf 97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
mul-1-neg97.3%
unsub-neg97.3%
Simplified97.3%
Taylor expanded in y around inf 97.3%
mul-1-neg97.3%
distribute-neg-frac297.3%
Simplified97.3%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(if (<= x -30000000000.0)
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(* (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) (/ 1.0 x))
101.7851458539211)
x)))
(if (<= x 9.4e+24)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(*
(+ x -2.0)
(+
4.16438922228
(/ (- (/ (+ 3451.550173699799 (/ y x)) x) 101.7851458539211) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -30000000000.0) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x));
} else if (x <= 9.4e+24) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / 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) :: tmp
if (x <= (-30000000000.0d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) * (1.0d0 / x)) - 101.7851458539211d0) / x))
else if (x <= 9.4d+24) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + (y / x)) / x) - 101.7851458539211d0) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -30000000000.0) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x));
} else if (x <= 9.4e+24) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -30000000000.0: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x)) elif x <= 9.4e+24: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -30000000000.0) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) * Float64(1.0 / x)) - 101.7851458539211) / x))); elseif (x <= 9.4e+24) 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)); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(y / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -30000000000.0) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x)); elseif (x <= 9.4e+24) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -30000000000.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] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.4e+24], 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], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(y / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -30000000000:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\left(3451.550173699799 + \frac{y - 124074.40615218398}{x}\right) \cdot \frac{1}{x} - 101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 9.4 \cdot 10^{+24}:\\
\;\;\;\;\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}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if x < -3e10Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around -inf 98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
Simplified98.9%
div-inv99.0%
Applied egg-rr99.0%
if -3e10 < x < 9.3999999999999999e24Initial program 99.7%
Taylor expanded in x around 0 98.8%
*-commutative98.8%
Simplified98.8%
if 9.3999999999999999e24 < x Initial program 4.1%
associate-/l*12.9%
sub-neg12.9%
metadata-eval12.9%
fma-define12.9%
fma-define12.9%
fma-define12.9%
fma-define12.9%
fma-define12.9%
fma-define12.9%
fma-define12.9%
Simplified12.9%
Taylor expanded in x around -inf 95.8%
mul-1-neg95.8%
unsub-neg95.8%
mul-1-neg95.8%
unsub-neg95.8%
mul-1-neg95.8%
unsub-neg95.8%
mul-1-neg95.8%
unsub-neg95.8%
Simplified95.8%
Taylor expanded in y around inf 95.8%
mul-1-neg95.8%
distribute-neg-frac295.8%
Simplified95.8%
Final simplification98.2%
(FPCore (x y z)
:precision binary64
(if (<= x -37.0)
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(* (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) (/ 1.0 x))
101.7851458539211)
x)))
(if (<= x 42.0)
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+ 47.066876606 (* x 313.399215894)))
(*
(+ x -2.0)
(+
4.16438922228
(/ (- (/ (+ 3451.550173699799 (/ y x)) x) 101.7851458539211) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -37.0) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x));
} else if (x <= 42.0) {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / 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) :: tmp
if (x <= (-37.0d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) * (1.0d0 / x)) - 101.7851458539211d0) / x))
else if (x <= 42.0d0) then
tmp = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / (47.066876606d0 + (x * 313.399215894d0))
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + (y / x)) / x) - 101.7851458539211d0) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -37.0) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x));
} else if (x <= 42.0) {
tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * 313.399215894));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -37.0: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x)) elif x <= 42.0: tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * 313.399215894)) else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -37.0) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) * Float64(1.0 / x)) - 101.7851458539211) / x))); elseif (x <= 42.0) tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(47.066876606 + Float64(x * 313.399215894))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(y / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -37.0) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x)); elseif (x <= 42.0) tmp = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / (47.066876606 + (x * 313.399215894)); else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -37.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] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 42.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(y / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -37:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\left(3451.550173699799 + \frac{y - 124074.40615218398}{x}\right) \cdot \frac{1}{x} - 101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 42:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if x < -37Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around -inf 98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
Simplified98.9%
div-inv99.0%
Applied egg-rr99.0%
if -37 < x < 42Initial program 99.7%
Taylor expanded in x around inf 99.1%
Taylor expanded in x around 0 99.1%
*-commutative99.1%
Simplified99.1%
if 42 < x Initial program 12.2%
associate-/l*20.2%
sub-neg20.2%
metadata-eval20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
Simplified20.2%
Taylor expanded in x around -inf 91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
Simplified91.6%
Taylor expanded in y around inf 91.6%
mul-1-neg91.6%
distribute-neg-frac291.6%
Simplified91.6%
Final simplification97.3%
(FPCore (x y z)
:precision binary64
(if (<= x -0.175)
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(* (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) (/ 1.0 x))
101.7851458539211)
x)))
(if (<= x 6.5)
(-
(* z -0.0424927283095952)
(*
x
(-
(*
x
(-
(* 0.0212463641547976 (- 275.038832832 y))
(* x -0.4223685497810532)))
(* 0.0212463641547976 (+ z (* y -2.0))))))
(*
(+ x -2.0)
(+
4.16438922228
(/ (- (/ (+ 3451.550173699799 (/ y x)) x) 101.7851458539211) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.175) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x));
} else if (x <= 6.5) {
tmp = (z * -0.0424927283095952) - (x * ((x * ((0.0212463641547976 * (275.038832832 - y)) - (x * -0.4223685497810532))) - (0.0212463641547976 * (z + (y * -2.0)))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / 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) :: tmp
if (x <= (-0.175d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) * (1.0d0 / x)) - 101.7851458539211d0) / x))
else if (x <= 6.5d0) then
tmp = (z * (-0.0424927283095952d0)) - (x * ((x * ((0.0212463641547976d0 * (275.038832832d0 - y)) - (x * (-0.4223685497810532d0)))) - (0.0212463641547976d0 * (z + (y * (-2.0d0))))))
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + (y / x)) / x) - 101.7851458539211d0) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.175) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x));
} else if (x <= 6.5) {
tmp = (z * -0.0424927283095952) - (x * ((x * ((0.0212463641547976 * (275.038832832 - y)) - (x * -0.4223685497810532))) - (0.0212463641547976 * (z + (y * -2.0)))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.175: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x)) elif x <= 6.5: tmp = (z * -0.0424927283095952) - (x * ((x * ((0.0212463641547976 * (275.038832832 - y)) - (x * -0.4223685497810532))) - (0.0212463641547976 * (z + (y * -2.0))))) else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.175) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) * Float64(1.0 / x)) - 101.7851458539211) / x))); elseif (x <= 6.5) tmp = Float64(Float64(z * -0.0424927283095952) - Float64(x * Float64(Float64(x * Float64(Float64(0.0212463641547976 * Float64(275.038832832 - y)) - Float64(x * -0.4223685497810532))) - Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0)))))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(y / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.175) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x)); elseif (x <= 6.5) tmp = (z * -0.0424927283095952) - (x * ((x * ((0.0212463641547976 * (275.038832832 - y)) - (x * -0.4223685497810532))) - (0.0212463641547976 * (z + (y * -2.0))))); else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.175], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5], N[(N[(z * -0.0424927283095952), $MachinePrecision] - N[(x * N[(N[(x * N[(N[(0.0212463641547976 * N[(275.038832832 - y), $MachinePrecision]), $MachinePrecision] - N[(x * -0.4223685497810532), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(y / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.175:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\left(3451.550173699799 + \frac{y - 124074.40615218398}{x}\right) \cdot \frac{1}{x} - 101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 6.5:\\
\;\;\;\;z \cdot -0.0424927283095952 - x \cdot \left(x \cdot \left(0.0212463641547976 \cdot \left(275.038832832 - y\right) - x \cdot -0.4223685497810532\right) - 0.0212463641547976 \cdot \left(z + y \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if x < -0.17499999999999999Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around -inf 98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
Simplified98.9%
div-inv99.0%
Applied egg-rr99.0%
if -0.17499999999999999 < x < 6.5Initial program 99.7%
Taylor expanded in x around inf 99.1%
Taylor expanded in x around inf 98.8%
Taylor expanded in x around 0 98.4%
if 6.5 < x Initial program 12.2%
associate-/l*20.2%
sub-neg20.2%
metadata-eval20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
Simplified20.2%
Taylor expanded in x around -inf 91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
Simplified91.6%
Taylor expanded in y around inf 91.6%
mul-1-neg91.6%
distribute-neg-frac291.6%
Simplified91.6%
Final simplification97.0%
(FPCore (x y z)
:precision binary64
(if (<= x -0.175)
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(* (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) (/ 1.0 x))
101.7851458539211)
x)))
(if (<= x 35.0)
(-
(* z -0.0424927283095952)
(*
x
(-
(* 0.0212463641547976 (* x (- 275.038832832 y)))
(* 0.0212463641547976 (+ z (* y -2.0))))))
(*
(+ x -2.0)
(+
4.16438922228
(/ (- (/ (+ 3451.550173699799 (/ y x)) x) 101.7851458539211) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.175) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x));
} else if (x <= 35.0) {
tmp = (z * -0.0424927283095952) - (x * ((0.0212463641547976 * (x * (275.038832832 - y))) - (0.0212463641547976 * (z + (y * -2.0)))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / 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) :: tmp
if (x <= (-0.175d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) * (1.0d0 / x)) - 101.7851458539211d0) / x))
else if (x <= 35.0d0) then
tmp = (z * (-0.0424927283095952d0)) - (x * ((0.0212463641547976d0 * (x * (275.038832832d0 - y))) - (0.0212463641547976d0 * (z + (y * (-2.0d0))))))
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + (y / x)) / x) - 101.7851458539211d0) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.175) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x));
} else if (x <= 35.0) {
tmp = (z * -0.0424927283095952) - (x * ((0.0212463641547976 * (x * (275.038832832 - y))) - (0.0212463641547976 * (z + (y * -2.0)))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.175: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x)) elif x <= 35.0: tmp = (z * -0.0424927283095952) - (x * ((0.0212463641547976 * (x * (275.038832832 - y))) - (0.0212463641547976 * (z + (y * -2.0))))) else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.175) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) * Float64(1.0 / x)) - 101.7851458539211) / x))); elseif (x <= 35.0) tmp = Float64(Float64(z * -0.0424927283095952) - Float64(x * Float64(Float64(0.0212463641547976 * Float64(x * Float64(275.038832832 - y))) - Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0)))))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(y / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.175) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x)); elseif (x <= 35.0) tmp = (z * -0.0424927283095952) - (x * ((0.0212463641547976 * (x * (275.038832832 - y))) - (0.0212463641547976 * (z + (y * -2.0))))); else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.175], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 35.0], N[(N[(z * -0.0424927283095952), $MachinePrecision] - N[(x * N[(N[(0.0212463641547976 * N[(x * N[(275.038832832 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(y / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.175:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\left(3451.550173699799 + \frac{y - 124074.40615218398}{x}\right) \cdot \frac{1}{x} - 101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 35:\\
\;\;\;\;z \cdot -0.0424927283095952 - x \cdot \left(0.0212463641547976 \cdot \left(x \cdot \left(275.038832832 - y\right)\right) - 0.0212463641547976 \cdot \left(z + y \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if x < -0.17499999999999999Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around -inf 98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
Simplified98.9%
div-inv99.0%
Applied egg-rr99.0%
if -0.17499999999999999 < x < 35Initial program 99.7%
Taylor expanded in x around inf 99.1%
Taylor expanded in x around inf 98.8%
Taylor expanded in x around 0 98.4%
if 35 < x Initial program 12.2%
associate-/l*20.2%
sub-neg20.2%
metadata-eval20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
Simplified20.2%
Taylor expanded in x around -inf 91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
Simplified91.6%
Taylor expanded in y around inf 91.6%
mul-1-neg91.6%
distribute-neg-frac291.6%
Simplified91.6%
Final simplification97.0%
(FPCore (x y z)
:precision binary64
(if (or (<= x -0.175) (not (<= x 2.0)))
(*
(+ x -2.0)
(+
4.16438922228
(/ (- (/ (+ 3451.550173699799 (/ y x)) x) 101.7851458539211) x)))
(+
(* z -0.0424927283095952)
(* 0.0212463641547976 (* x (+ z (* y -2.0)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -0.175) || !(x <= 2.0)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x));
} else {
tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -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 <= (-0.175d0)) .or. (.not. (x <= 2.0d0))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + (y / x)) / x) - 101.7851458539211d0) / x))
else
tmp = (z * (-0.0424927283095952d0)) + (0.0212463641547976d0 * (x * (z + (y * (-2.0d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -0.175) || !(x <= 2.0)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x));
} else {
tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -0.175) or not (x <= 2.0): tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)) else: tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -0.175) || !(x <= 2.0)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(y / x)) / x) - 101.7851458539211) / x))); else tmp = Float64(Float64(z * -0.0424927283095952) + Float64(0.0212463641547976 * Float64(x * Float64(z + Float64(y * -2.0))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -0.175) || ~((x <= 2.0))) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)); else tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -0.175], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(y / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(0.0212463641547976 * N[(x * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.175 \lor \neg \left(x \leq 2\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952 + 0.0212463641547976 \cdot \left(x \cdot \left(z + y \cdot -2\right)\right)\\
\end{array}
\end{array}
if x < -0.17499999999999999 or 2 < x Initial program 11.5%
associate-/l*16.9%
sub-neg16.9%
metadata-eval16.9%
fma-define16.9%
fma-define16.9%
fma-define16.9%
fma-define16.9%
fma-define16.9%
fma-define16.9%
fma-define16.9%
Simplified16.9%
Taylor expanded in x around -inf 95.4%
mul-1-neg95.4%
unsub-neg95.4%
mul-1-neg95.4%
unsub-neg95.4%
mul-1-neg95.4%
unsub-neg95.4%
mul-1-neg95.4%
unsub-neg95.4%
Simplified95.4%
Taylor expanded in y around inf 95.4%
mul-1-neg95.4%
distribute-neg-frac295.4%
Simplified95.4%
if -0.17499999999999999 < x < 2Initial program 99.7%
Taylor expanded in x around inf 99.1%
Taylor expanded in x around inf 98.8%
Taylor expanded in x around 0 95.0%
Final simplification95.2%
(FPCore (x y z)
:precision binary64
(if (<= x -0.165)
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(* (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) (/ 1.0 x))
101.7851458539211)
x)))
(if (<= x 1.6)
(+
(* z -0.0424927283095952)
(* 0.0212463641547976 (* x (+ z (* y -2.0)))))
(*
(+ x -2.0)
(+
4.16438922228
(/ (- (/ (+ 3451.550173699799 (/ y x)) x) 101.7851458539211) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.165) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x));
} else if (x <= 1.6) {
tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / 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) :: tmp
if (x <= (-0.165d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) * (1.0d0 / x)) - 101.7851458539211d0) / x))
else if (x <= 1.6d0) then
tmp = (z * (-0.0424927283095952d0)) + (0.0212463641547976d0 * (x * (z + (y * (-2.0d0)))))
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + (y / x)) / x) - 101.7851458539211d0) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.165) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x));
} else if (x <= 1.6) {
tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.165: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x)) elif x <= 1.6: tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0)))) else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.165) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) * Float64(1.0 / x)) - 101.7851458539211) / x))); elseif (x <= 1.6) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(0.0212463641547976 * Float64(x * Float64(z + Float64(y * -2.0))))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(y / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.165) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) * (1.0 / x)) - 101.7851458539211) / x)); elseif (x <= 1.6) tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0)))); else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (y / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.165], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(0.0212463641547976 * N[(x * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(y / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.165:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\left(3451.550173699799 + \frac{y - 124074.40615218398}{x}\right) \cdot \frac{1}{x} - 101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 1.6:\\
\;\;\;\;z \cdot -0.0424927283095952 + 0.0212463641547976 \cdot \left(x \cdot \left(z + y \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if x < -0.165000000000000008Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around -inf 98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
mul-1-neg98.9%
unsub-neg98.9%
Simplified98.9%
div-inv99.0%
Applied egg-rr99.0%
if -0.165000000000000008 < x < 1.6000000000000001Initial program 99.7%
Taylor expanded in x around inf 99.1%
Taylor expanded in x around inf 98.8%
Taylor expanded in x around 0 95.0%
if 1.6000000000000001 < x Initial program 12.2%
associate-/l*20.2%
sub-neg20.2%
metadata-eval20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
fma-define20.2%
Simplified20.2%
Taylor expanded in x around -inf 91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
mul-1-neg91.6%
unsub-neg91.6%
Simplified91.6%
Taylor expanded in y around inf 91.6%
mul-1-neg91.6%
distribute-neg-frac291.6%
Simplified91.6%
Final simplification95.2%
(FPCore (x y z)
:precision binary64
(if (<= x -0.175)
(* x (- 4.16438922228 (/ 110.1139242984811 x)))
(if (<= x 45.0)
(+
(* z -0.0424927283095952)
(* 0.0212463641547976 (* x (+ z (* y -2.0)))))
(* x (+ 4.16438922228 (/ 70.37071397084 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.175) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 45.0) {
tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0))));
} else {
tmp = x * (4.16438922228 + (70.37071397084 / 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) :: tmp
if (x <= (-0.175d0)) then
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
else if (x <= 45.0d0) then
tmp = (z * (-0.0424927283095952d0)) + (0.0212463641547976d0 * (x * (z + (y * (-2.0d0)))))
else
tmp = x * (4.16438922228d0 + (70.37071397084d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.175) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 45.0) {
tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0))));
} else {
tmp = x * (4.16438922228 + (70.37071397084 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.175: tmp = x * (4.16438922228 - (110.1139242984811 / x)) elif x <= 45.0: tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0)))) else: tmp = x * (4.16438922228 + (70.37071397084 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.175) tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); elseif (x <= 45.0) tmp = Float64(Float64(z * -0.0424927283095952) + Float64(0.0212463641547976 * Float64(x * Float64(z + Float64(y * -2.0))))); else tmp = Float64(x * Float64(4.16438922228 + Float64(70.37071397084 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.175) tmp = x * (4.16438922228 - (110.1139242984811 / x)); elseif (x <= 45.0) tmp = (z * -0.0424927283095952) + (0.0212463641547976 * (x * (z + (y * -2.0)))); else tmp = x * (4.16438922228 + (70.37071397084 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.175], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 45.0], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(0.0212463641547976 * N[(x * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(70.37071397084 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.175:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\mathbf{elif}\;x \leq 45:\\
\;\;\;\;z \cdot -0.0424927283095952 + 0.0212463641547976 \cdot \left(x \cdot \left(z + y \cdot -2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{70.37071397084}{x}\right)\\
\end{array}
\end{array}
if x < -0.17499999999999999Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around inf 93.1%
associate-*r/93.1%
metadata-eval93.1%
Simplified93.1%
if -0.17499999999999999 < x < 45Initial program 99.7%
Taylor expanded in x around inf 99.1%
Taylor expanded in x around inf 98.8%
Taylor expanded in x around 0 95.0%
if 45 < x Initial program 12.2%
Taylor expanded in x around inf 10.7%
Taylor expanded in x around inf 80.2%
associate-*r/80.2%
metadata-eval80.2%
Simplified80.2%
Final simplification91.1%
(FPCore (x y z)
:precision binary64
(if (<= x -37.0)
(* x (- 4.16438922228 (/ 110.1139242984811 x)))
(if (<= x 23.0)
(/ (* (- x 2.0) z) (+ 47.066876606 (* x 313.399215894)))
(* x (+ 4.16438922228 (/ 70.37071397084 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -37.0) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 23.0) {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894));
} else {
tmp = x * (4.16438922228 + (70.37071397084 / 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) :: tmp
if (x <= (-37.0d0)) then
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
else if (x <= 23.0d0) then
tmp = ((x - 2.0d0) * z) / (47.066876606d0 + (x * 313.399215894d0))
else
tmp = x * (4.16438922228d0 + (70.37071397084d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -37.0) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 23.0) {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894));
} else {
tmp = x * (4.16438922228 + (70.37071397084 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -37.0: tmp = x * (4.16438922228 - (110.1139242984811 / x)) elif x <= 23.0: tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894)) else: tmp = x * (4.16438922228 + (70.37071397084 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -37.0) tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); elseif (x <= 23.0) tmp = Float64(Float64(Float64(x - 2.0) * z) / Float64(47.066876606 + Float64(x * 313.399215894))); else tmp = Float64(x * Float64(4.16438922228 + Float64(70.37071397084 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -37.0) tmp = x * (4.16438922228 - (110.1139242984811 / x)); elseif (x <= 23.0) tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894)); else tmp = x * (4.16438922228 + (70.37071397084 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -37.0], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 23.0], N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(70.37071397084 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -37:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\mathbf{elif}\;x \leq 23:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{70.37071397084}{x}\right)\\
\end{array}
\end{array}
if x < -37Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around inf 93.1%
associate-*r/93.1%
metadata-eval93.1%
Simplified93.1%
if -37 < x < 23Initial 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 z around inf 67.5%
Taylor expanded in x around 0 66.9%
*-commutative66.9%
Simplified66.9%
if 23 < x Initial program 12.2%
Taylor expanded in x around inf 10.7%
Taylor expanded in x around inf 80.2%
associate-*r/80.2%
metadata-eval80.2%
Simplified80.2%
Final simplification76.5%
(FPCore (x y z)
:precision binary64
(if (<= x -37.0)
(* x (- 4.16438922228 (/ 110.1139242984811 x)))
(if (<= x 2.0)
(/ (* z -2.0) (+ 47.066876606 (* x 313.399215894)))
(* x (+ 4.16438922228 (/ 70.37071397084 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -37.0) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 2.0) {
tmp = (z * -2.0) / (47.066876606 + (x * 313.399215894));
} else {
tmp = x * (4.16438922228 + (70.37071397084 / 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) :: tmp
if (x <= (-37.0d0)) then
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
else if (x <= 2.0d0) then
tmp = (z * (-2.0d0)) / (47.066876606d0 + (x * 313.399215894d0))
else
tmp = x * (4.16438922228d0 + (70.37071397084d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -37.0) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 2.0) {
tmp = (z * -2.0) / (47.066876606 + (x * 313.399215894));
} else {
tmp = x * (4.16438922228 + (70.37071397084 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -37.0: tmp = x * (4.16438922228 - (110.1139242984811 / x)) elif x <= 2.0: tmp = (z * -2.0) / (47.066876606 + (x * 313.399215894)) else: tmp = x * (4.16438922228 + (70.37071397084 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -37.0) tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); elseif (x <= 2.0) tmp = Float64(Float64(z * -2.0) / Float64(47.066876606 + Float64(x * 313.399215894))); else tmp = Float64(x * Float64(4.16438922228 + Float64(70.37071397084 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -37.0) tmp = x * (4.16438922228 - (110.1139242984811 / x)); elseif (x <= 2.0) tmp = (z * -2.0) / (47.066876606 + (x * 313.399215894)); else tmp = x * (4.16438922228 + (70.37071397084 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -37.0], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.0], N[(N[(z * -2.0), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(70.37071397084 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -37:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;\frac{z \cdot -2}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{70.37071397084}{x}\right)\\
\end{array}
\end{array}
if x < -37Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around inf 93.1%
associate-*r/93.1%
metadata-eval93.1%
Simplified93.1%
if -37 < x < 2Initial 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 z around inf 67.5%
Taylor expanded in x around 0 66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in x around 0 66.9%
*-commutative66.9%
Simplified66.9%
if 2 < x Initial program 12.2%
Taylor expanded in x around inf 10.7%
Taylor expanded in x around inf 80.2%
associate-*r/80.2%
metadata-eval80.2%
Simplified80.2%
(FPCore (x y z)
:precision binary64
(if (<= x -0.086)
(* x (- 4.16438922228 (/ 110.1139242984811 x)))
(if (<= x 6.5e-18)
(/ (* (- x 2.0) z) 47.066876606)
(* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.086) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 6.5e-18) {
tmp = ((x - 2.0) * z) / 47.066876606;
} 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 <= (-0.086d0)) then
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
else if (x <= 6.5d-18) then
tmp = ((x - 2.0d0) * z) / 47.066876606d0
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 <= -0.086) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 6.5e-18) {
tmp = ((x - 2.0) * z) / 47.066876606;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.086: tmp = x * (4.16438922228 - (110.1139242984811 / x)) elif x <= 6.5e-18: tmp = ((x - 2.0) * z) / 47.066876606 else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.086) tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); elseif (x <= 6.5e-18) tmp = Float64(Float64(Float64(x - 2.0) * z) / 47.066876606); 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 <= -0.086) tmp = x * (4.16438922228 - (110.1139242984811 / x)); elseif (x <= 6.5e-18) tmp = ((x - 2.0) * z) / 47.066876606; else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.086], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-18], N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / 47.066876606), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.086:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-18}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606}\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -0.085999999999999993Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around inf 93.1%
associate-*r/93.1%
metadata-eval93.1%
Simplified93.1%
if -0.085999999999999993 < x < 6.50000000000000008e-18Initial 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 z around inf 68.7%
Taylor expanded in x around 0 68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in x around 0 68.7%
if 6.50000000000000008e-18 < x Initial program 17.8%
associate-/l*25.2%
sub-neg25.2%
metadata-eval25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
Simplified25.2%
Taylor expanded in x around inf 75.6%
Final simplification76.5%
(FPCore (x y z)
:precision binary64
(if (<= x -0.175)
(* x (- 4.16438922228 (/ 110.1139242984811 x)))
(if (<= x 6.5e-18)
(* (+ x -2.0) (* z 0.0212463641547976))
(* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.175) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 6.5e-18) {
tmp = (x + -2.0) * (z * 0.0212463641547976);
} 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 <= (-0.175d0)) then
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
else if (x <= 6.5d-18) then
tmp = (x + (-2.0d0)) * (z * 0.0212463641547976d0)
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 <= -0.175) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 6.5e-18) {
tmp = (x + -2.0) * (z * 0.0212463641547976);
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.175: tmp = x * (4.16438922228 - (110.1139242984811 / x)) elif x <= 6.5e-18: tmp = (x + -2.0) * (z * 0.0212463641547976) else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.175) tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); elseif (x <= 6.5e-18) tmp = Float64(Float64(x + -2.0) * Float64(z * 0.0212463641547976)); 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 <= -0.175) tmp = x * (4.16438922228 - (110.1139242984811 / x)); elseif (x <= 6.5e-18) tmp = (x + -2.0) * (z * 0.0212463641547976); else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.175], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-18], N[(N[(x + -2.0), $MachinePrecision] * N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.175:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-18}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -0.17499999999999999Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around inf 93.1%
associate-*r/93.1%
metadata-eval93.1%
Simplified93.1%
if -0.17499999999999999 < x < 6.50000000000000008e-18Initial 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 68.4%
if 6.50000000000000008e-18 < x Initial program 17.8%
associate-/l*25.2%
sub-neg25.2%
metadata-eval25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
Simplified25.2%
Taylor expanded in x around inf 75.6%
Final simplification76.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -0.155) (not (<= x 6.5e-18))) (* 4.16438922228 (+ x -2.0)) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -0.155) || !(x <= 6.5e-18)) {
tmp = 4.16438922228 * (x + -2.0);
} 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 <= (-0.155d0)) .or. (.not. (x <= 6.5d-18))) then
tmp = 4.16438922228d0 * (x + (-2.0d0))
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 <= -0.155) || !(x <= 6.5e-18)) {
tmp = 4.16438922228 * (x + -2.0);
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -0.155) or not (x <= 6.5e-18): tmp = 4.16438922228 * (x + -2.0) else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -0.155) || !(x <= 6.5e-18)) tmp = Float64(4.16438922228 * Float64(x + -2.0)); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -0.155) || ~((x <= 6.5e-18))) tmp = 4.16438922228 * (x + -2.0); else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -0.155], N[Not[LessEqual[x, 6.5e-18]], $MachinePrecision]], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.155 \lor \neg \left(x \leq 6.5 \cdot 10^{-18}\right):\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -0.154999999999999999 or 6.50000000000000008e-18 < x Initial program 14.3%
associate-/l*19.5%
sub-neg19.5%
metadata-eval19.5%
fma-define19.5%
fma-define19.5%
fma-define19.5%
fma-define19.5%
fma-define19.5%
fma-define19.5%
fma-define19.5%
Simplified19.5%
Taylor expanded in x around inf 84.1%
if -0.154999999999999999 < x < 6.50000000000000008e-18Initial 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 68.4%
*-commutative68.4%
Simplified68.4%
Final simplification76.2%
(FPCore (x y z) :precision binary64 (if (<= x -0.175) (* x (- 4.16438922228 (/ 110.1139242984811 x))) (if (<= x 6.5e-18) (* z -0.0424927283095952) (* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.175) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 6.5e-18) {
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 <= (-0.175d0)) then
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
else if (x <= 6.5d-18) 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 <= -0.175) {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
} else if (x <= 6.5e-18) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.175: tmp = x * (4.16438922228 - (110.1139242984811 / x)) elif x <= 6.5e-18: tmp = z * -0.0424927283095952 else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.175) tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); elseif (x <= 6.5e-18) 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 <= -0.175) tmp = x * (4.16438922228 - (110.1139242984811 / x)); elseif (x <= 6.5e-18) tmp = z * -0.0424927283095952; else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.175], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.5e-18], N[(z * -0.0424927283095952), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.175:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-18}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -0.17499999999999999Initial program 10.9%
associate-/l*13.8%
sub-neg13.8%
metadata-eval13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
fma-define13.8%
Simplified13.8%
Taylor expanded in x around inf 93.1%
associate-*r/93.1%
metadata-eval93.1%
Simplified93.1%
if -0.17499999999999999 < x < 6.50000000000000008e-18Initial 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 68.4%
*-commutative68.4%
Simplified68.4%
if 6.50000000000000008e-18 < x Initial program 17.8%
associate-/l*25.2%
sub-neg25.2%
metadata-eval25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
fma-define25.2%
Simplified25.2%
Taylor expanded in x around inf 75.6%
Final simplification76.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -14500.0) (not (<= x 2.0))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -14500.0) || !(x <= 2.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 <= (-14500.0d0)) .or. (.not. (x <= 2.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 <= -14500.0) || !(x <= 2.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -14500.0) or not (x <= 2.0): tmp = x * 4.16438922228 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -14500.0) || !(x <= 2.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 <= -14500.0) || ~((x <= 2.0))) tmp = x * 4.16438922228; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -14500.0], N[Not[LessEqual[x, 2.0]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -14500 \lor \neg \left(x \leq 2\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -14500 or 2 < x Initial program 11.5%
Simplified16.9%
fma-define16.9%
flip-+16.9%
frac-2neg16.9%
sub-neg16.9%
pow216.9%
metadata-eval16.9%
metadata-eval16.9%
fma-neg16.9%
metadata-eval16.9%
Applied egg-rr16.9%
neg-sub016.9%
+-commutative16.9%
associate--r+16.9%
metadata-eval16.9%
unpow216.9%
swap-sqr16.8%
unpow216.8%
metadata-eval16.9%
fma-undefine16.9%
distribute-neg-in16.9%
distribute-rgt-neg-in16.9%
metadata-eval16.9%
metadata-eval16.9%
Simplified16.9%
Taylor expanded in x around inf 86.6%
*-commutative86.6%
Simplified86.6%
if -14500 < x < 2Initial 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 66.6%
*-commutative66.6%
Simplified66.6%
Final simplification76.2%
(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 57.3%
Simplified59.7%
fma-define59.7%
flip-+59.7%
frac-2neg59.7%
sub-neg59.7%
pow259.7%
metadata-eval59.7%
metadata-eval59.7%
fma-neg59.7%
metadata-eval59.7%
Applied egg-rr59.7%
neg-sub059.7%
+-commutative59.7%
associate--r+59.7%
metadata-eval59.7%
unpow259.7%
swap-sqr59.7%
unpow259.7%
metadata-eval59.8%
fma-undefine59.8%
distribute-neg-in59.8%
distribute-rgt-neg-in59.8%
metadata-eval59.8%
metadata-eval59.8%
Simplified59.8%
Taylor expanded in x around inf 43.3%
*-commutative43.3%
Simplified43.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 2024099
(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)))