
(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 23 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
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))
(t_1
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))))
(if (<= (/ (* (- x 2.0) (+ t_1 z)) t_0) 1e+293)
(* (+ x -2.0) (+ (/ z t_0) (/ t_1 t_0)))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x))))))
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 1e+293) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = 47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0))))))
t_1 = x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)
if ((((x - 2.0d0) * (t_1 + z)) / t_0) <= 1d+293) then
tmp = (x + (-2.0d0)) * ((z / t_0) + (t_1 / t_0))
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y);
double tmp;
if ((((x - 2.0) * (t_1 + z)) / t_0) <= 1e+293) {
tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y) tmp = 0 if (((x - 2.0) * (t_1 + z)) / t_0) <= 1e+293: tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)) else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) t_1 = Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(t_1 + z)) / t_0) <= 1e+293) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z / t_0) + Float64(t_1 / t_0))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); t_1 = x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y); tmp = 0.0; if ((((x - 2.0) * (t_1 + z)) / t_0) <= 1e+293) tmp = (x + -2.0) * ((z / t_0) + (t_1 / t_0)); else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(t$95$1 + z), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], 1e+293], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z / t$95$0), $MachinePrecision] + N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_1 := x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right)\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(t\_1 + z\right)}{t\_0} \leq 10^{+293}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(\frac{z}{t\_0} + \frac{t\_1}{t\_0}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < 9.9999999999999992e292Initial program 93.6%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-define99.4%
fma-define99.4%
fma-define99.4%
fma-define99.4%
fma-define99.4%
fma-define99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in z around 0 99.4%
if 9.9999999999999992e292 < (/.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.3%
associate-/l*4.6%
sub-neg4.6%
metadata-eval4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
Simplified4.6%
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%
Final simplification98.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)))
(t_1
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))
(t_2 (/ t_0 t_1)))
(if (<= t_2 (- INFINITY))
(* x (+ 4.16438922228 (/ z t_1)))
(if (<= t_2 1e+293)
(/
t_0
(+
47.066876606
(*
x
(-
313.399215894
(* x (- (* x (* x (- -1.0 (/ 43.3400022514 x)))) 263.505074721))))))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))))))
double code(double x, double y, double z) {
double t_0 = (x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z);
double t_1 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_2 = t_0 / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = x * (4.16438922228 + (z / t_1));
} else if (t_2 <= 1e+293) {
tmp = t_0 / (47.066876606 + (x * (313.399215894 - (x * ((x * (x * (-1.0 - (43.3400022514 / x)))) - 263.505074721)))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
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);
double t_1 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_2 = t_0 / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = x * (4.16438922228 + (z / t_1));
} else if (t_2 <= 1e+293) {
tmp = t_0 / (47.066876606 + (x * (313.399215894 - (x * ((x * (x * (-1.0 - (43.3400022514 / x)))) - 263.505074721)))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): t_0 = (x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z) t_1 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) t_2 = t_0 / t_1 tmp = 0 if t_2 <= -math.inf: tmp = x * (4.16438922228 + (z / t_1)) elif t_2 <= 1e+293: tmp = t_0 / (47.066876606 + (x * (313.399215894 - (x * ((x * (x * (-1.0 - (43.3400022514 / x)))) - 263.505074721))))) else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) t_0 = Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) t_1 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) t_2 = Float64(t_0 / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(x * Float64(4.16438922228 + Float64(z / t_1))); elseif (t_2 <= 1e+293) tmp = Float64(t_0 / Float64(47.066876606 + Float64(x * Float64(313.399215894 - Float64(x * Float64(Float64(x * Float64(x * Float64(-1.0 - Float64(43.3400022514 / x)))) - 263.505074721)))))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z); t_1 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); t_2 = t_0 / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = x * (4.16438922228 + (z / t_1)); elseif (t_2 <= 1e+293) tmp = t_0 / (47.066876606 + (x * (313.399215894 - (x * ((x * (x * (-1.0 - (43.3400022514 / x)))) - 263.505074721))))); else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x - 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]}, Block[{t$95$1 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(x * N[(4.16438922228 + N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+293], N[(t$95$0 / N[(47.066876606 + N[(x * N[(313.399215894 - N[(x * N[(N[(x * N[(x * N[(-1.0 - N[(43.3400022514 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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_1 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_2 := \frac{t\_0}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{z}{t\_1}\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+293}:\\
\;\;\;\;\frac{t\_0}{47.066876606 + x \cdot \left(313.399215894 - x \cdot \left(x \cdot \left(x \cdot \left(-1 - \frac{43.3400022514}{x}\right)\right) - 263.505074721\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < -inf.0Initial program 4.1%
associate-/l*98.7%
sub-neg98.7%
metadata-eval98.7%
fma-define98.7%
fma-define98.7%
fma-define98.7%
fma-define98.7%
fma-define98.7%
fma-define98.7%
fma-define98.7%
Simplified98.7%
Taylor expanded in z around 0 98.7%
Taylor expanded in x around inf 93.4%
Taylor expanded in x around inf 93.4%
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))) < 9.9999999999999992e292Initial program 99.5%
Taylor expanded in x around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
if 9.9999999999999992e292 < (/.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.3%
associate-/l*4.6%
sub-neg4.6%
metadata-eval4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
Simplified4.6%
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%
Final simplification98.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514))))))))
(t_1
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
t_0)))
(if (<= t_1 (- INFINITY))
(* x (+ 4.16438922228 (/ z t_0)))
(if (<= t_1 1e+293)
t_1
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))))))
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x * (4.16438922228 + (z / t_0));
} else if (t_1 <= 1e+293) {
tmp = t_1;
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x * (4.16438922228 + (z / t_0));
} else if (t_1 <= 1e+293) {
tmp = t_1;
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0 tmp = 0 if t_1 <= -math.inf: tmp = x * (4.16438922228 + (z / t_0)) elif t_1 <= 1e+293: tmp = t_1 else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) t_1 = 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) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x * Float64(4.16438922228 + Float64(z / t_0))); elseif (t_1 <= 1e+293) tmp = t_1; else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); t_1 = ((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0; tmp = 0.0; if (t_1 <= -Inf) tmp = x * (4.16438922228 + (z / t_0)); elseif (t_1 <= 1e+293) tmp = t_1; else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(x * N[(4.16438922228 + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+293], t$95$1, N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
t_1 := \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}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{z}{t\_0}\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+293}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < -inf.0Initial program 4.1%
associate-/l*98.7%
sub-neg98.7%
metadata-eval98.7%
fma-define98.7%
fma-define98.7%
fma-define98.7%
fma-define98.7%
fma-define98.7%
fma-define98.7%
fma-define98.7%
Simplified98.7%
Taylor expanded in z around 0 98.7%
Taylor expanded in x around inf 93.4%
Taylor expanded in x around inf 93.4%
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))) < 9.9999999999999992e292Initial program 99.5%
if 9.9999999999999992e292 < (/.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.3%
associate-/l*4.6%
sub-neg4.6%
metadata-eval4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
fma-define4.6%
Simplified4.6%
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%
Final simplification98.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514)))))))))
(if (<= x -3.7e+28)
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))
(if (<= x 3000000.0)
(/
(*
(- x 2.0)
(+ z (* x (+ y (* x (+ 137.519416416 (* x 78.6994924154)))))))
t_0)
(* (+ x -2.0) (+ 4.16438922228 (/ z t_0)))))))
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double tmp;
if (x <= -3.7e+28) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else if (x <= 3000000.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / 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 = 47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0))))))
if (x <= (-3.7d+28)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
else if (x <= 3000000.0d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * (137.519416416d0 + (x * 78.6994924154d0))))))) / t_0
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / t_0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double tmp;
if (x <= -3.7e+28) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else if (x <= 3000000.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / t_0));
}
return tmp;
}
def code(x, y, z): t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) tmp = 0 if x <= -3.7e+28: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) elif x <= 3000000.0: tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / t_0 else: tmp = (x + -2.0) * (4.16438922228 + (z / t_0)) return tmp
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) tmp = 0.0 if (x <= -3.7e+28) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); elseif (x <= 3000000.0) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * 78.6994924154))))))) / t_0); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / t_0))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); tmp = 0.0; if (x <= -3.7e+28) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); elseif (x <= 3000000.0) tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / t_0; else tmp = (x + -2.0) * (4.16438922228 + (z / t_0)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.7e+28], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3000000.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
\mathbf{if}\;x \leq -3.7 \cdot 10^{+28}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 3000000:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot 78.6994924154\right)\right)\right)}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{t\_0}\right)\\
\end{array}
\end{array}
if x < -3.6999999999999999e28Initial program 8.8%
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 95.3%
mul-1-neg95.3%
unsub-neg95.3%
mul-1-neg95.3%
unsub-neg95.3%
mul-1-neg95.3%
unsub-neg95.3%
mul-1-neg95.3%
unsub-neg95.3%
Simplified95.3%
if -3.6999999999999999e28 < x < 3e6Initial program 99.6%
Taylor expanded in x around 0 98.3%
*-commutative98.3%
Simplified98.3%
if 3e6 < x Initial program 22.0%
associate-/l*30.1%
sub-neg30.1%
metadata-eval30.1%
fma-define30.2%
fma-define30.2%
fma-define30.2%
fma-define30.2%
fma-define30.2%
fma-define30.2%
fma-define30.2%
Simplified30.2%
Taylor expanded in z around 0 30.2%
Taylor expanded in x around inf 94.5%
Final simplification96.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514)))))))))
(if (<= x -3.5e+28)
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))
(if (<= x 3000000.0)
(/ (* (- x 2.0) (+ z (* x (+ y (* x 137.519416416))))) t_0)
(* (+ x -2.0) (+ 4.16438922228 (/ z t_0)))))))
double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double tmp;
if (x <= -3.5e+28) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else if (x <= 3000000.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / 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 = 47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0))))))
if (x <= (-3.5d+28)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
else if (x <= 3000000.0d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / t_0
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / t_0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))));
double tmp;
if (x <= -3.5e+28) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else if (x <= 3000000.0) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0;
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / t_0));
}
return tmp;
}
def code(x, y, z): t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))) tmp = 0 if x <= -3.5e+28: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) elif x <= 3000000.0: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0 else: tmp = (x + -2.0) * (4.16438922228 + (z / t_0)) return tmp
function code(x, y, z) t_0 = Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514))))))) tmp = 0.0 if (x <= -3.5e+28) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); elseif (x <= 3000000.0) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / t_0); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / t_0))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))); tmp = 0.0; if (x <= -3.5e+28) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); elseif (x <= 3000000.0) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / t_0; else tmp = (x + -2.0) * (4.16438922228 + (z / t_0)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.5e+28], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3000000.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{+28}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 3000000:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{t\_0}\right)\\
\end{array}
\end{array}
if x < -3.5e28Initial program 8.8%
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 95.3%
mul-1-neg95.3%
unsub-neg95.3%
mul-1-neg95.3%
unsub-neg95.3%
mul-1-neg95.3%
unsub-neg95.3%
mul-1-neg95.3%
unsub-neg95.3%
Simplified95.3%
if -3.5e28 < x < 3e6Initial program 99.6%
Taylor expanded in x around 0 98.3%
*-commutative98.3%
Simplified98.3%
if 3e6 < x Initial program 22.0%
associate-/l*30.1%
sub-neg30.1%
metadata-eval30.1%
fma-define30.2%
fma-define30.2%
fma-define30.2%
fma-define30.2%
fma-define30.2%
fma-define30.2%
fma-define30.2%
Simplified30.2%
Taylor expanded in z around 0 30.2%
Taylor expanded in x around inf 94.5%
Final simplification96.4%
(FPCore (x y z)
:precision binary64
(if (<= x -1.0)
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))
(if (<= x 0.048)
(/
(*
(- x 2.0)
(+ z (* x (+ y (* x (+ 137.519416416 (* x 78.6994924154)))))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514)))))))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.0) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else if (x <= 0.048) {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))))));
}
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 <= (-1.0d0)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
else if (x <= 0.048d0) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * (137.519416416d0 + (x * 78.6994924154d0))))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / (47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0)))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.0) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else if (x <= 0.048) {
tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.0: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) elif x <= 0.048: tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) else: tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); elseif (x <= 0.048) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * Float64(137.519416416 + Float64(x * 78.6994924154))))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514)))))))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.0) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); elseif (x <= 0.048) tmp = ((x - 2.0) * (z + (x * (y + (x * (137.519416416 + (x * 78.6994924154))))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); else tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.0], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.048], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * N[(137.519416416 + N[(x * 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 0.048:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot \left(137.519416416 + x \cdot 78.6994924154\right)\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\right)\\
\end{array}
\end{array}
if x < -1Initial program 12.3%
associate-/l*22.5%
sub-neg22.5%
metadata-eval22.5%
fma-define22.4%
fma-define22.4%
fma-define22.4%
fma-define22.4%
fma-define22.5%
fma-define22.4%
fma-define22.4%
Simplified22.4%
Taylor expanded in x around -inf 92.9%
mul-1-neg92.9%
unsub-neg92.9%
mul-1-neg92.9%
unsub-neg92.9%
mul-1-neg92.9%
unsub-neg92.9%
mul-1-neg92.9%
unsub-neg92.9%
Simplified92.9%
if -1 < x < 0.048000000000000001Initial program 99.8%
Taylor expanded in x around 0 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
*-commutative99.8%
Simplified99.8%
if 0.048000000000000001 < x Initial program 25.2%
associate-/l*33.0%
sub-neg33.0%
metadata-eval33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.1%
Simplified33.1%
Taylor expanded in z around 0 33.0%
Taylor expanded in x around inf 92.4%
Final simplification95.7%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-18)
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))
(if (<= x 0.000185)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(+ (* -0.14147091005106402 (* x z)) (* 0.0212463641547976 (* x y)))))
(*
(+ x -2.0)
(+
4.16438922228
(/
z
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514)))))))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else if (x <= 0.000185) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y))));
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))))));
}
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 <= (-1d-18)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
else if (x <= 0.000185d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (((-0.14147091005106402d0) * (x * z)) + (0.0212463641547976d0 * (x * y))))
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + (z / (47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0)))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else if (x <= 0.000185) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y))));
} else {
tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) elif x <= 0.000185: tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y)))) else: tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); elseif (x <= 0.000185) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(Float64(-0.14147091005106402 * Float64(x * z)) + Float64(0.0212463641547976 * Float64(x * y))))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(z / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514)))))))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e-18) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); elseif (x <= 0.000185) tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y)))); else tmp = (x + -2.0) * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.000185], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(N[(-0.14147091005106402 * N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(0.0212463641547976 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 0.000185:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + \left(-0.14147091005106402 \cdot \left(x \cdot z\right) + 0.0212463641547976 \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in x around -inf 91.7%
mul-1-neg91.7%
unsub-neg91.7%
mul-1-neg91.7%
unsub-neg91.7%
mul-1-neg91.7%
unsub-neg91.7%
mul-1-neg91.7%
unsub-neg91.7%
Simplified91.7%
if -1.0000000000000001e-18 < x < 1.85e-4Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
Taylor expanded in y around 0 93.4%
if 1.85e-4 < x Initial program 25.2%
associate-/l*33.0%
sub-neg33.0%
metadata-eval33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.1%
Simplified33.1%
Taylor expanded in z around 0 33.0%
Taylor expanded in x around inf 92.4%
Final simplification92.6%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-18)
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))
(if (<= x 0.78)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(+ (* -0.14147091005106402 (* x z)) (* 0.0212463641547976 (* x y)))))
(*
x
(+
4.16438922228
(/
z
(+
47.066876606
(*
x
(+
313.399215894
(* x (+ 263.505074721 (* x (+ x 43.3400022514)))))))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else if (x <= 0.78) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y))));
} else {
tmp = x * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))))));
}
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 <= (-1d-18)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
else if (x <= 0.78d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (((-0.14147091005106402d0) * (x * z)) + (0.0212463641547976d0 * (x * y))))
else
tmp = x * (4.16438922228d0 + (z / (47.066876606d0 + (x * (313.399215894d0 + (x * (263.505074721d0 + (x * (x + 43.3400022514d0)))))))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else if (x <= 0.78) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y))));
} else {
tmp = x * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514)))))))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) elif x <= 0.78: tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y)))) else: tmp = x * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); elseif (x <= 0.78) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(Float64(-0.14147091005106402 * Float64(x * z)) + Float64(0.0212463641547976 * Float64(x * y))))); else tmp = Float64(x * Float64(4.16438922228 + Float64(z / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * Float64(263.505074721 + Float64(x * Float64(x + 43.3400022514)))))))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e-18) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); elseif (x <= 0.78) tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y)))); else tmp = x * (4.16438922228 + (z / (47.066876606 + (x * (313.399215894 + (x * (263.505074721 + (x * (x + 43.3400022514))))))))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.78], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(N[(-0.14147091005106402 * N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(0.0212463641547976 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(z / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * N[(263.505074721 + N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{elif}\;x \leq 0.78:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + \left(-0.14147091005106402 \cdot \left(x \cdot z\right) + 0.0212463641547976 \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot \left(263.505074721 + x \cdot \left(x + 43.3400022514\right)\right)\right)}\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in x around -inf 91.7%
mul-1-neg91.7%
unsub-neg91.7%
mul-1-neg91.7%
unsub-neg91.7%
mul-1-neg91.7%
unsub-neg91.7%
mul-1-neg91.7%
unsub-neg91.7%
Simplified91.7%
if -1.0000000000000001e-18 < x < 0.78000000000000003Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
Taylor expanded in y around 0 93.4%
if 0.78000000000000003 < x Initial program 25.2%
associate-/l*33.0%
sub-neg33.0%
metadata-eval33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.1%
Simplified33.1%
Taylor expanded in z around 0 33.0%
Taylor expanded in x around inf 92.4%
Taylor expanded in x around inf 90.3%
Final simplification92.1%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1e-18) (not (<= x 0.75)))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ (- y 124074.40615218398) x)) x)
101.7851458539211)
x)))
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(+ (* -0.14147091005106402 (* x z)) (* 0.0212463641547976 (* x y)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1e-18) || !(x <= 0.75)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1d-18)) .or. (.not. (x <= 0.75d0))) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((y - 124074.40615218398d0) / x)) / x) - 101.7851458539211d0) / x))
else
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (((-0.14147091005106402d0) * (x * z)) + (0.0212463641547976d0 * (x * y))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1e-18) || !(x <= 0.75)) {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x));
} else {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1e-18) or not (x <= 0.75): tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)) else: tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1e-18) || !(x <= 0.75)) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(Float64(y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x))); else tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(Float64(-0.14147091005106402 * Float64(x * z)) + Float64(0.0212463641547976 * Float64(x * y))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1e-18) || ~((x <= 0.75))) tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + ((y - 124074.40615218398) / x)) / x) - 101.7851458539211) / x)); else tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1e-18], N[Not[LessEqual[x, 0.75]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(N[(y - 124074.40615218398), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(N[(-0.14147091005106402 * N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(0.0212463641547976 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18} \lor \neg \left(x \leq 0.75\right):\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{y - 124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + \left(-0.14147091005106402 \cdot \left(x \cdot z\right) + 0.0212463641547976 \cdot \left(x \cdot y\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18 or 0.75 < x Initial program 19.2%
associate-/l*28.2%
sub-neg28.2%
metadata-eval28.2%
fma-define28.2%
fma-define28.2%
fma-define28.2%
fma-define28.2%
fma-define28.2%
fma-define28.1%
fma-define28.2%
Simplified28.2%
Taylor expanded in x around -inf 87.9%
mul-1-neg87.9%
unsub-neg87.9%
mul-1-neg87.9%
unsub-neg87.9%
mul-1-neg87.9%
unsub-neg87.9%
mul-1-neg87.9%
unsub-neg87.9%
Simplified87.9%
if -1.0000000000000001e-18 < x < 0.75Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
Taylor expanded in y around 0 93.4%
Final simplification90.3%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-18)
(*
(+ x -2.0)
(- 4.16438922228 (/ (+ 101.7851458539211 (/ -3451.550173699799 x)) x)))
(if (<= x 0.78)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(+ (* -0.14147091005106402 (* x z)) (* 0.0212463641547976 (* x y)))))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ -124074.40615218398 x)) x)
101.7851458539211)
x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x));
} else if (x <= 0.78) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (-124074.40615218398 / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1d-18)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - ((101.7851458539211d0 + ((-3451.550173699799d0) / x)) / x))
else if (x <= 0.78d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (((-0.14147091005106402d0) * (x * z)) + (0.0212463641547976d0 * (x * y))))
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((-124074.40615218398d0) / 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 <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x));
} else if (x <= 0.78) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (-124074.40615218398 / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x)) elif x <= 0.78: tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y)))) else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (-124074.40615218398 / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(-3451.550173699799 / x)) / x))); elseif (x <= 0.78) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(Float64(-0.14147091005106402 * Float64(x * z)) + Float64(0.0212463641547976 * Float64(x * y))))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(-124074.40615218398 / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e-18) tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x)); elseif (x <= 0.78) tmp = (x + -2.0) * ((z * 0.0212463641547976) + ((-0.14147091005106402 * (x * z)) + (0.0212463641547976 * (x * y)))); else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (-124074.40615218398 / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(-3451.550173699799 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.78], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(N[(-0.14147091005106402 * N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(0.0212463641547976 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(-124074.40615218398 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{-3451.550173699799}{x}}{x}\right)\\
\mathbf{elif}\;x \leq 0.78:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + \left(-0.14147091005106402 \cdot \left(x \cdot z\right) + 0.0212463641547976 \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{-124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in x around -inf 86.1%
mul-1-neg86.1%
unsub-neg86.1%
sub-neg86.1%
associate-*r/86.1%
metadata-eval86.1%
distribute-neg-frac86.1%
metadata-eval86.1%
Simplified86.1%
if -1.0000000000000001e-18 < x < 0.78000000000000003Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
Taylor expanded in y around 0 93.4%
if 0.78000000000000003 < x Initial program 25.2%
associate-/l*33.0%
sub-neg33.0%
metadata-eval33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.1%
Simplified33.1%
Taylor expanded in y around 0 30.8%
Taylor expanded in x around -inf 80.9%
mul-1-neg80.9%
unsub-neg80.9%
mul-1-neg80.9%
unsub-neg80.9%
sub-neg80.9%
associate-*r/80.9%
metadata-eval80.9%
distribute-neg-frac80.9%
metadata-eval80.9%
Simplified80.9%
Final simplification87.8%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-18)
(*
(+ x -2.0)
(- 4.16438922228 (/ (+ 101.7851458539211 (/ -3451.550173699799 x)) x)))
(if (<= x 0.78)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))
(*
(+ x -2.0)
(+
4.16438922228
(/
(-
(/ (+ 3451.550173699799 (/ -124074.40615218398 x)) x)
101.7851458539211)
x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x));
} else if (x <= 0.78) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (-124074.40615218398 / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1d-18)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - ((101.7851458539211d0 + ((-3451.550173699799d0) / x)) / x))
else if (x <= 0.78d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
else
tmp = (x + (-2.0d0)) * (4.16438922228d0 + ((((3451.550173699799d0 + ((-124074.40615218398d0) / 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 <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x));
} else if (x <= 0.78) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (-124074.40615218398 / x)) / x) - 101.7851458539211) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x)) elif x <= 0.78: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) else: tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (-124074.40615218398 / x)) / x) - 101.7851458539211) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(-3451.550173699799 / x)) / x))); elseif (x <= 0.78) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); else tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 + Float64(Float64(Float64(Float64(3451.550173699799 + Float64(-124074.40615218398 / x)) / x) - 101.7851458539211) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e-18) tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x)); elseif (x <= 0.78) tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); else tmp = (x + -2.0) * (4.16438922228 + ((((3451.550173699799 + (-124074.40615218398 / x)) / x) - 101.7851458539211) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(-3451.550173699799 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.78], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(x * N[(N[(y * 0.0212463641547976), $MachinePrecision] - N[(z * 0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 + N[(N[(N[(N[(3451.550173699799 + N[(-124074.40615218398 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - 101.7851458539211), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{-3451.550173699799}{x}}{x}\right)\\
\mathbf{elif}\;x \leq 0.78:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 + \frac{\frac{3451.550173699799 + \frac{-124074.40615218398}{x}}{x} - 101.7851458539211}{x}\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in x around -inf 86.1%
mul-1-neg86.1%
unsub-neg86.1%
sub-neg86.1%
associate-*r/86.1%
metadata-eval86.1%
distribute-neg-frac86.1%
metadata-eval86.1%
Simplified86.1%
if -1.0000000000000001e-18 < x < 0.78000000000000003Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
if 0.78000000000000003 < x Initial program 25.2%
associate-/l*33.0%
sub-neg33.0%
metadata-eval33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.1%
Simplified33.1%
Taylor expanded in y around 0 30.8%
Taylor expanded in x around -inf 80.9%
mul-1-neg80.9%
unsub-neg80.9%
mul-1-neg80.9%
unsub-neg80.9%
sub-neg80.9%
associate-*r/80.9%
metadata-eval80.9%
distribute-neg-frac80.9%
metadata-eval80.9%
Simplified80.9%
Final simplification87.8%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-18)
(*
(+ x -2.0)
(- 4.16438922228 (/ (+ 101.7851458539211 (/ -3451.550173699799 x)) x)))
(if (<= x 0.78)
(*
(+ x -2.0)
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))
(*
x
(+
4.16438922228
(/ (+ (/ 3655.1204654076414 x) -110.1139242984811) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x));
} else if (x <= 0.78) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / 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 <= (-1d-18)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - ((101.7851458539211d0 + ((-3451.550173699799d0) / x)) / x))
else if (x <= 0.78d0) then
tmp = (x + (-2.0d0)) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
else
tmp = x * (4.16438922228d0 + (((3655.1204654076414d0 / x) + (-110.1139242984811d0)) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x));
} else if (x <= 0.78) {
tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x)) elif x <= 0.78: tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) else: tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(-3451.550173699799 / x)) / x))); elseif (x <= 0.78) tmp = Float64(Float64(x + -2.0) * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); else tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(Float64(3655.1204654076414 / x) + -110.1139242984811) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e-18) tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x)); elseif (x <= 0.78) tmp = (x + -2.0) * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); else tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(-3451.550173699799 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.78], N[(N[(x + -2.0), $MachinePrecision] * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(x * N[(N[(y * 0.0212463641547976), $MachinePrecision] - N[(z * 0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(N[(N[(3655.1204654076414 / x), $MachinePrecision] + -110.1139242984811), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{-3451.550173699799}{x}}{x}\right)\\
\mathbf{elif}\;x \leq 0.78:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{\frac{3655.1204654076414}{x} + -110.1139242984811}{x}\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in x around -inf 86.1%
mul-1-neg86.1%
unsub-neg86.1%
sub-neg86.1%
associate-*r/86.1%
metadata-eval86.1%
distribute-neg-frac86.1%
metadata-eval86.1%
Simplified86.1%
if -1.0000000000000001e-18 < x < 0.78000000000000003Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
if 0.78000000000000003 < x Initial program 25.2%
associate-/l*33.0%
sub-neg33.0%
metadata-eval33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.1%
Simplified33.1%
Taylor expanded in y around 0 30.8%
Taylor expanded in x around inf 80.7%
associate--l+80.7%
unpow280.7%
associate-/r*80.7%
metadata-eval80.7%
associate-*r/80.7%
associate-*r/80.7%
metadata-eval80.7%
div-sub80.7%
sub-neg80.7%
associate-*r/80.7%
metadata-eval80.7%
metadata-eval80.7%
Simplified80.7%
Final simplification87.7%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-18)
(*
(+ x -2.0)
(- 4.16438922228 (/ (+ 101.7851458539211 (/ -3451.550173699799 x)) x)))
(if (<= x 0.78)
(*
-2.0
(+
(* z 0.0212463641547976)
(* x (- (* y 0.0212463641547976) (* z 0.14147091005106402)))))
(*
x
(+
4.16438922228
(/ (+ (/ 3655.1204654076414 x) -110.1139242984811) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x));
} else if (x <= 0.78) {
tmp = -2.0 * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / 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 <= (-1d-18)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - ((101.7851458539211d0 + ((-3451.550173699799d0) / x)) / x))
else if (x <= 0.78d0) then
tmp = (-2.0d0) * ((z * 0.0212463641547976d0) + (x * ((y * 0.0212463641547976d0) - (z * 0.14147091005106402d0))))
else
tmp = x * (4.16438922228d0 + (((3655.1204654076414d0 / x) + (-110.1139242984811d0)) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x));
} else if (x <= 0.78) {
tmp = -2.0 * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402))));
} else {
tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x)) elif x <= 0.78: tmp = -2.0 * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))) else: tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(-3451.550173699799 / x)) / x))); elseif (x <= 0.78) tmp = Float64(-2.0 * Float64(Float64(z * 0.0212463641547976) + Float64(x * Float64(Float64(y * 0.0212463641547976) - Float64(z * 0.14147091005106402))))); else tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(Float64(3655.1204654076414 / x) + -110.1139242984811) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e-18) tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x)); elseif (x <= 0.78) tmp = -2.0 * ((z * 0.0212463641547976) + (x * ((y * 0.0212463641547976) - (z * 0.14147091005106402)))); else tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(-3451.550173699799 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.78], N[(-2.0 * N[(N[(z * 0.0212463641547976), $MachinePrecision] + N[(x * N[(N[(y * 0.0212463641547976), $MachinePrecision] - N[(z * 0.14147091005106402), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(N[(N[(3655.1204654076414 / x), $MachinePrecision] + -110.1139242984811), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{-3451.550173699799}{x}}{x}\right)\\
\mathbf{elif}\;x \leq 0.78:\\
\;\;\;\;-2 \cdot \left(z \cdot 0.0212463641547976 + x \cdot \left(y \cdot 0.0212463641547976 - z \cdot 0.14147091005106402\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{\frac{3655.1204654076414}{x} + -110.1139242984811}{x}\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in x around -inf 86.1%
mul-1-neg86.1%
unsub-neg86.1%
sub-neg86.1%
associate-*r/86.1%
metadata-eval86.1%
distribute-neg-frac86.1%
metadata-eval86.1%
Simplified86.1%
if -1.0000000000000001e-18 < x < 0.78000000000000003Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around 0 93.4%
Taylor expanded in x around 0 93.4%
if 0.78000000000000003 < x Initial program 25.2%
associate-/l*33.0%
sub-neg33.0%
metadata-eval33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.0%
fma-define33.1%
Simplified33.1%
Taylor expanded in y around 0 30.8%
Taylor expanded in x around inf 80.7%
associate--l+80.7%
unpow280.7%
associate-/r*80.7%
metadata-eval80.7%
associate-*r/80.7%
associate-*r/80.7%
metadata-eval80.7%
div-sub80.7%
sub-neg80.7%
associate-*r/80.7%
metadata-eval80.7%
metadata-eval80.7%
Simplified80.7%
Final simplification87.7%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1e-18) (not (<= x 16.0)))
(*
x
(+ 4.16438922228 (/ (+ (/ 3655.1204654076414 x) -110.1139242984811) x)))
(/ (* (- x 2.0) z) (+ 47.066876606 (* x 313.399215894)))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1e-18) || !(x <= 16.0)) {
tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x));
} else {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894));
}
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 <= (-1d-18)) .or. (.not. (x <= 16.0d0))) then
tmp = x * (4.16438922228d0 + (((3655.1204654076414d0 / x) + (-110.1139242984811d0)) / x))
else
tmp = ((x - 2.0d0) * z) / (47.066876606d0 + (x * 313.399215894d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1e-18) || !(x <= 16.0)) {
tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x));
} else {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1e-18) or not (x <= 16.0): tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x)) else: tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894)) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1e-18) || !(x <= 16.0)) tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(Float64(3655.1204654076414 / x) + -110.1139242984811) / x))); else tmp = Float64(Float64(Float64(x - 2.0) * z) / Float64(47.066876606 + Float64(x * 313.399215894))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1e-18) || ~((x <= 16.0))) tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x)); else tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1e-18], N[Not[LessEqual[x, 16.0]], $MachinePrecision]], N[(x * N[(4.16438922228 + N[(N[(N[(3655.1204654076414 / x), $MachinePrecision] + -110.1139242984811), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(47.066876606 + N[(x * 313.399215894), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18} \lor \neg \left(x \leq 16\right):\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{\frac{3655.1204654076414}{x} + -110.1139242984811}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot 313.399215894}\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18 or 16 < x Initial program 18.7%
associate-/l*27.7%
sub-neg27.7%
metadata-eval27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
Simplified27.7%
Taylor expanded in y around 0 23.4%
Taylor expanded in x around inf 84.0%
associate--l+84.0%
unpow284.0%
associate-/r*84.0%
metadata-eval84.0%
associate-*r/84.0%
associate-*r/84.0%
metadata-eval84.0%
div-sub84.0%
sub-neg84.0%
associate-*r/84.0%
metadata-eval84.0%
metadata-eval84.0%
Simplified84.0%
if -1.0000000000000001e-18 < x < 16Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
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.0%
Taylor expanded in x around 0 67.2%
*-commutative67.2%
Simplified67.2%
Final simplification76.8%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1e-18) (not (<= x 76.0)))
(*
x
(+ 4.16438922228 (/ (+ (/ 3655.1204654076414 x) -110.1139242984811) x)))
(* (+ x -2.0) (* z 0.0212463641547976))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1e-18) || !(x <= 76.0)) {
tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x));
} else {
tmp = (x + -2.0) * (z * 0.0212463641547976);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((x <= (-1d-18)) .or. (.not. (x <= 76.0d0))) then
tmp = x * (4.16438922228d0 + (((3655.1204654076414d0 / x) + (-110.1139242984811d0)) / x))
else
tmp = (x + (-2.0d0)) * (z * 0.0212463641547976d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1e-18) || !(x <= 76.0)) {
tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x));
} else {
tmp = (x + -2.0) * (z * 0.0212463641547976);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1e-18) or not (x <= 76.0): tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x)) else: tmp = (x + -2.0) * (z * 0.0212463641547976) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1e-18) || !(x <= 76.0)) tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(Float64(3655.1204654076414 / x) + -110.1139242984811) / x))); else tmp = Float64(Float64(x + -2.0) * Float64(z * 0.0212463641547976)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1e-18) || ~((x <= 76.0))) tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x)); else tmp = (x + -2.0) * (z * 0.0212463641547976); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1e-18], N[Not[LessEqual[x, 76.0]], $MachinePrecision]], N[(x * N[(4.16438922228 + N[(N[(N[(3655.1204654076414 / x), $MachinePrecision] + -110.1139242984811), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] * N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18} \lor \neg \left(x \leq 76\right):\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{\frac{3655.1204654076414}{x} + -110.1139242984811}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18 or 76 < x Initial program 18.7%
associate-/l*27.7%
sub-neg27.7%
metadata-eval27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
Simplified27.7%
Taylor expanded in y around 0 23.4%
Taylor expanded in x around inf 84.0%
associate--l+84.0%
unpow284.0%
associate-/r*84.0%
metadata-eval84.0%
associate-*r/84.0%
associate-*r/84.0%
metadata-eval84.0%
div-sub84.0%
sub-neg84.0%
associate-*r/84.0%
metadata-eval84.0%
metadata-eval84.0%
Simplified84.0%
if -1.0000000000000001e-18 < x < 76Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
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.8%
Final simplification76.6%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-18)
(*
(+ x -2.0)
(- 4.16438922228 (/ (+ 101.7851458539211 (/ -3451.550173699799 x)) x)))
(if (<= x 2.3)
(/ (* (- x 2.0) z) (+ 47.066876606 (* x 313.399215894)))
(*
x
(+
4.16438922228
(/ (+ (/ 3655.1204654076414 x) -110.1139242984811) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x));
} else if (x <= 2.3) {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894));
} else {
tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / 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 <= (-1d-18)) then
tmp = (x + (-2.0d0)) * (4.16438922228d0 - ((101.7851458539211d0 + ((-3451.550173699799d0) / x)) / x))
else if (x <= 2.3d0) then
tmp = ((x - 2.0d0) * z) / (47.066876606d0 + (x * 313.399215894d0))
else
tmp = x * (4.16438922228d0 + (((3655.1204654076414d0 / x) + (-110.1139242984811d0)) / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x));
} else if (x <= 2.3) {
tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894));
} else {
tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x)) elif x <= 2.3: tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894)) else: tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(Float64(x + -2.0) * Float64(4.16438922228 - Float64(Float64(101.7851458539211 + Float64(-3451.550173699799 / x)) / x))); elseif (x <= 2.3) tmp = Float64(Float64(Float64(x - 2.0) * z) / Float64(47.066876606 + Float64(x * 313.399215894))); else tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(Float64(3655.1204654076414 / x) + -110.1139242984811) / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e-18) tmp = (x + -2.0) * (4.16438922228 - ((101.7851458539211 + (-3451.550173699799 / x)) / x)); elseif (x <= 2.3) tmp = ((x - 2.0) * z) / (47.066876606 + (x * 313.399215894)); else tmp = x * (4.16438922228 + (((3655.1204654076414 / x) + -110.1139242984811) / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(N[(x + -2.0), $MachinePrecision] * N[(4.16438922228 - N[(N[(101.7851458539211 + N[(-3451.550173699799 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3], 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[(N[(N[(3655.1204654076414 / x), $MachinePrecision] + -110.1139242984811), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;\left(x + -2\right) \cdot \left(4.16438922228 - \frac{101.7851458539211 + \frac{-3451.550173699799}{x}}{x}\right)\\
\mathbf{elif}\;x \leq 2.3:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot 313.399215894}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{\frac{3655.1204654076414}{x} + -110.1139242984811}{x}\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in x around -inf 86.1%
mul-1-neg86.1%
unsub-neg86.1%
sub-neg86.1%
associate-*r/86.1%
metadata-eval86.1%
distribute-neg-frac86.1%
metadata-eval86.1%
Simplified86.1%
if -1.0000000000000001e-18 < x < 2.2999999999999998Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
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.0%
Taylor expanded in x around 0 67.2%
*-commutative67.2%
Simplified67.2%
if 2.2999999999999998 < x Initial program 24.2%
associate-/l*32.1%
sub-neg32.1%
metadata-eval32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
Simplified32.1%
Taylor expanded in y around 0 29.9%
Taylor expanded in x around inf 81.8%
associate--l+81.8%
unpow281.8%
associate-/r*81.8%
metadata-eval81.8%
associate-*r/81.8%
associate-*r/81.8%
metadata-eval81.8%
div-sub81.8%
sub-neg81.8%
associate-*r/81.8%
metadata-eval81.8%
metadata-eval81.8%
Simplified81.8%
Final simplification76.8%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-18)
(* x 4.16438922228)
(if (<= x 27.5)
(* (+ x -2.0) (* z 0.0212463641547976))
(* x (- 4.16438922228 (/ 110.1139242984811 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = x * 4.16438922228;
} else if (x <= 27.5) {
tmp = (x + -2.0) * (z * 0.0212463641547976);
} else {
tmp = x * (4.16438922228 - (110.1139242984811 / 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 <= (-1d-18)) then
tmp = x * 4.16438922228d0
else if (x <= 27.5d0) then
tmp = (x + (-2.0d0)) * (z * 0.0212463641547976d0)
else
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = x * 4.16438922228;
} else if (x <= 27.5) {
tmp = (x + -2.0) * (z * 0.0212463641547976);
} else {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = x * 4.16438922228 elif x <= 27.5: tmp = (x + -2.0) * (z * 0.0212463641547976) else: tmp = x * (4.16438922228 - (110.1139242984811 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(x * 4.16438922228); elseif (x <= 27.5) tmp = Float64(Float64(x + -2.0) * Float64(z * 0.0212463641547976)); else tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e-18) tmp = x * 4.16438922228; elseif (x <= 27.5) tmp = (x + -2.0) * (z * 0.0212463641547976); else tmp = x * (4.16438922228 - (110.1139242984811 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 27.5], N[(N[(x + -2.0), $MachinePrecision] * N[(z * 0.0212463641547976), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 27.5:\\
\;\;\;\;\left(x + -2\right) \cdot \left(z \cdot 0.0212463641547976\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in y around 0 17.2%
Taylor expanded in x around inf 86.1%
*-commutative86.1%
Simplified86.1%
if -1.0000000000000001e-18 < x < 27.5Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
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.8%
if 27.5 < x Initial program 24.2%
associate-/l*32.1%
sub-neg32.1%
metadata-eval32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
Simplified32.1%
Taylor expanded in x around inf 81.2%
associate-*r/81.2%
metadata-eval81.2%
Simplified81.2%
Final simplification76.4%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-18)
(* x 4.16438922228)
(if (<= x 3.1)
(* z -0.0424927283095952)
(* x (- 4.16438922228 (/ 110.1139242984811 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = x * 4.16438922228;
} else if (x <= 3.1) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * (4.16438922228 - (110.1139242984811 / 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 <= (-1d-18)) then
tmp = x * 4.16438922228d0
else if (x <= 3.1d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = x * (4.16438922228d0 - (110.1139242984811d0 / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = x * 4.16438922228;
} else if (x <= 3.1) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * (4.16438922228 - (110.1139242984811 / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = x * 4.16438922228 elif x <= 3.1: tmp = z * -0.0424927283095952 else: tmp = x * (4.16438922228 - (110.1139242984811 / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(x * 4.16438922228); elseif (x <= 3.1) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e-18) tmp = x * 4.16438922228; elseif (x <= 3.1) tmp = z * -0.0424927283095952; else tmp = x * (4.16438922228 - (110.1139242984811 / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 3.1], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * N[(4.16438922228 - N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 3.1:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 - \frac{110.1139242984811}{x}\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in y around 0 17.2%
Taylor expanded in x around inf 86.1%
*-commutative86.1%
Simplified86.1%
if -1.0000000000000001e-18 < x < 3.10000000000000009Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
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.8%
*-commutative66.8%
Simplified66.8%
if 3.10000000000000009 < x Initial program 24.2%
associate-/l*32.1%
sub-neg32.1%
metadata-eval32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
Simplified32.1%
Taylor expanded in x around inf 81.2%
associate-*r/81.2%
metadata-eval81.2%
Simplified81.2%
(FPCore (x y z)
:precision binary64
(if (<= x -1e-18)
(* x 4.16438922228)
(if (<= x 0.88)
(* z -0.0424927283095952)
(+ (* x 4.16438922228) -8.32877844456))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = x * 4.16438922228;
} else if (x <= 0.88) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) + -8.32877844456;
}
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 <= (-1d-18)) then
tmp = x * 4.16438922228d0
else if (x <= 0.88d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = (x * 4.16438922228d0) + (-8.32877844456d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = x * 4.16438922228;
} else if (x <= 0.88) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x * 4.16438922228) + -8.32877844456;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = x * 4.16438922228 elif x <= 0.88: tmp = z * -0.0424927283095952 else: tmp = (x * 4.16438922228) + -8.32877844456 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(x * 4.16438922228); elseif (x <= 0.88) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(x * 4.16438922228) + -8.32877844456); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1e-18) tmp = x * 4.16438922228; elseif (x <= 0.88) tmp = z * -0.0424927283095952; else tmp = (x * 4.16438922228) + -8.32877844456; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 0.88], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(x * 4.16438922228), $MachinePrecision] + -8.32877844456), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 0.88:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 + -8.32877844456\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in y around 0 17.2%
Taylor expanded in x around inf 86.1%
*-commutative86.1%
Simplified86.1%
if -1.0000000000000001e-18 < x < 0.880000000000000004Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
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.8%
*-commutative66.8%
Simplified66.8%
if 0.880000000000000004 < x Initial program 24.2%
associate-/l*32.1%
sub-neg32.1%
metadata-eval32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
Simplified32.1%
Taylor expanded in z around 0 32.1%
Taylor expanded in x around inf 92.3%
Taylor expanded in z around 0 80.5%
sub-neg80.5%
metadata-eval80.5%
distribute-lft-in80.5%
metadata-eval80.5%
Simplified80.5%
Final simplification76.3%
(FPCore (x y z) :precision binary64 (if (<= x -1e-18) (* x 4.16438922228) (if (<= x 0.88) (* z -0.0424927283095952) (* 4.16438922228 (+ x -2.0)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1e-18) {
tmp = x * 4.16438922228;
} else if (x <= 0.88) {
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 <= (-1d-18)) then
tmp = x * 4.16438922228d0
else if (x <= 0.88d0) 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 <= -1e-18) {
tmp = x * 4.16438922228;
} else if (x <= 0.88) {
tmp = z * -0.0424927283095952;
} else {
tmp = 4.16438922228 * (x + -2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1e-18: tmp = x * 4.16438922228 elif x <= 0.88: tmp = z * -0.0424927283095952 else: tmp = 4.16438922228 * (x + -2.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1e-18) tmp = Float64(x * 4.16438922228); elseif (x <= 0.88) 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 <= -1e-18) tmp = x * 4.16438922228; elseif (x <= 0.88) tmp = z * -0.0424927283095952; else tmp = 4.16438922228 * (x + -2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1e-18], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 0.88], N[(z * -0.0424927283095952), $MachinePrecision], N[(4.16438922228 * N[(x + -2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-18}:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 0.88:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;4.16438922228 \cdot \left(x + -2\right)\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18Initial program 13.4%
associate-/l*23.5%
sub-neg23.5%
metadata-eval23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.5%
fma-define23.4%
fma-define23.4%
Simplified23.4%
Taylor expanded in y around 0 17.2%
Taylor expanded in x around inf 86.1%
*-commutative86.1%
Simplified86.1%
if -1.0000000000000001e-18 < x < 0.880000000000000004Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
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.8%
*-commutative66.8%
Simplified66.8%
if 0.880000000000000004 < x Initial program 24.2%
associate-/l*32.1%
sub-neg32.1%
metadata-eval32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
fma-define32.1%
Simplified32.1%
Taylor expanded in x around inf 80.5%
Final simplification76.3%
(FPCore (x y z) :precision binary64 (if (or (<= x -1e-18) (not (<= x 2.0))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1e-18) || !(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 <= (-1d-18)) .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 <= -1e-18) || !(x <= 2.0)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1e-18) 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 <= -1e-18) || !(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 <= -1e-18) || ~((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, -1e-18], 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 -1 \cdot 10^{-18} \lor \neg \left(x \leq 2\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -1.0000000000000001e-18 or 2 < x Initial program 18.7%
associate-/l*27.7%
sub-neg27.7%
metadata-eval27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
fma-define27.7%
Simplified27.7%
Taylor expanded in y around 0 23.4%
Taylor expanded in x around inf 83.4%
*-commutative83.4%
Simplified83.4%
if -1.0000000000000001e-18 < x < 2Initial program 99.8%
associate-/l*99.8%
sub-neg99.8%
metadata-eval99.8%
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.8%
*-commutative66.8%
Simplified66.8%
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 53.5%
associate-/l*58.6%
sub-neg58.6%
metadata-eval58.6%
fma-define58.6%
fma-define58.6%
fma-define58.6%
fma-define58.6%
fma-define58.6%
fma-define58.6%
fma-define58.6%
Simplified58.6%
Taylor expanded in y around 0 44.7%
Taylor expanded in x around inf 49.0%
*-commutative49.0%
Simplified49.0%
(FPCore (x y z) :precision binary64 78.6994924154)
double code(double x, double y, double z) {
return 78.6994924154;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 78.6994924154d0
end function
public static double code(double x, double y, double z) {
return 78.6994924154;
}
def code(x, y, z): return 78.6994924154
function code(x, y, z) return 78.6994924154 end
function tmp = code(x, y, z) tmp = 78.6994924154; end
code[x_, y_, z_] := 78.6994924154
\begin{array}{l}
\\
78.6994924154
\end{array}
Initial program 53.5%
Taylor expanded in x around 0 48.4%
*-commutative48.4%
Simplified48.4%
Taylor expanded in x around inf 3.2%
(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 2024116
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
:precision binary64
:alt
(! :herbie-platform default (if (< x -332612872587000500000000000000000000000000000000000000000000000) (- (+ (/ y (* x x)) (* 104109730557/25000000000 x)) 1101139242984811/10000000000000) (if (< x 94299917145546730000000000000000000000000000000000000000) (* (/ (- x 2) 1) (/ (+ (* (+ (* (+ (* (+ (* x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z) (+ (* (+ (+ (* 263505074721/1000000000 x) (+ (* 216700011257/5000000000 (* x x)) (* x (* x x)))) 156699607947/500000000) x) 23533438303/500000000))) (- (+ (/ y (* x x)) (* 104109730557/25000000000 x)) 1101139242984811/10000000000000))))
(/ (* (- 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)))