
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
2e+303)
(fma
y
(/
(fma z (fma z 0.0692910599291889 0.4917317610505968) 0.279195317918525)
(fma z (+ z 6.012459259764103) 3.350343815022304))
x)
(+
x
(/
(* y (- 0.004801250986110448 (/ 0.005643327829101921 (pow z 2.0))))
(+ 0.0692910599291889 (/ -0.07512208616047561 z))))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 2e+303) {
tmp = fma(y, (fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, (z + 6.012459259764103), 3.350343815022304)), x);
} else {
tmp = x + ((y * (0.004801250986110448 - (0.005643327829101921 / pow(z, 2.0)))) / (0.0692910599291889 + (-0.07512208616047561 / z)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 2e+303) tmp = fma(y, Float64(fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, Float64(z + 6.012459259764103), 3.350343815022304)), x); else tmp = Float64(x + Float64(Float64(y * Float64(0.004801250986110448 - Float64(0.005643327829101921 / (z ^ 2.0)))) / Float64(0.0692910599291889 + Float64(-0.07512208616047561 / z)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 2e+303], N[(y * N[(N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] + 0.279195317918525), $MachinePrecision] / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(N[(y * N[(0.004801250986110448 - N[(0.005643327829101921 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0692910599291889 + N[(-0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(0.004801250986110448 - \frac{0.005643327829101921}{{z}^{2}}\right)}{0.0692910599291889 + \frac{-0.07512208616047561}{z}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 2e303Initial program 96.4%
+-commutative96.4%
associate-/l*99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
Simplified99.8%
if 2e303 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.6%
remove-double-neg0.6%
distribute-lft-neg-out0.6%
distribute-neg-frac0.6%
associate-/l*8.5%
distribute-rgt-neg-in8.5%
distribute-lft-neg-in8.5%
distribute-rgt-neg-in8.5%
remove-double-neg8.5%
Simplified8.5%
Taylor expanded in z around -inf 99.4%
mul-1-neg99.4%
unsub-neg99.4%
sub-neg99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around inf 99.4%
*-commutative99.4%
flip--99.4%
associate-*l/99.1%
metadata-eval99.6%
frac-times99.6%
metadata-eval99.6%
pow299.6%
Applied egg-rr99.6%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
2e+303)
(+
x
(*
y
(/
(fma (fma z 0.0692910599291889 0.4917317610505968) z 0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+
x
(/
(* y (- 0.004801250986110448 (/ 0.005643327829101921 (pow z 2.0))))
(+ 0.0692910599291889 (/ -0.07512208616047561 z))))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 2e+303) {
tmp = x + (y * (fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} else {
tmp = x + ((y * (0.004801250986110448 - (0.005643327829101921 / pow(z, 2.0)))) / (0.0692910599291889 + (-0.07512208616047561 / z)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 2e+303) tmp = Float64(x + Float64(y * Float64(fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma(Float64(z + 6.012459259764103), z, 3.350343815022304)))); else tmp = Float64(x + Float64(Float64(y * Float64(0.004801250986110448 - Float64(0.005643327829101921 / (z ^ 2.0)))) / Float64(0.0692910599291889 + Float64(-0.07512208616047561 / z)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 2e+303], N[(x + N[(y * N[(N[(N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision] / N[(N[(z + 6.012459259764103), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(0.004801250986110448 - N[(0.005643327829101921 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0692910599291889 + N[(-0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 2 \cdot 10^{+303}:\\
\;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(0.004801250986110448 - \frac{0.005643327829101921}{{z}^{2}}\right)}{0.0692910599291889 + \frac{-0.07512208616047561}{z}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 2e303Initial program 96.4%
remove-double-neg96.4%
distribute-lft-neg-out96.4%
distribute-neg-frac96.4%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
remove-double-neg99.8%
Simplified99.8%
if 2e303 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.6%
remove-double-neg0.6%
distribute-lft-neg-out0.6%
distribute-neg-frac0.6%
associate-/l*8.5%
distribute-rgt-neg-in8.5%
distribute-lft-neg-in8.5%
distribute-rgt-neg-in8.5%
remove-double-neg8.5%
Simplified8.5%
Taylor expanded in z around -inf 99.4%
mul-1-neg99.4%
unsub-neg99.4%
sub-neg99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in z around inf 99.4%
*-commutative99.4%
flip--99.4%
associate-*l/99.1%
metadata-eval99.6%
frac-times99.6%
metadata-eval99.6%
pow299.6%
Applied egg-rr99.6%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+
x
(*
y
(-
0.0692910599291889
(/ (+ -0.07512208616047561 (/ 0.4046220386999212 z)) z))))
(if (<= z 3.0)
(+
x
(*
y
(+
0.08333333333333323
(*
z
(-
(* z (+ 0.0007936505811533442 (* z -0.0005951669793454025)))
0.00277777777751721)))))
(+
x
(/
(* y (- 0.004801250986110448 (/ 0.005643327829101921 (pow z 2.0))))
(+ 0.0692910599291889 (/ -0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z)));
} else if (z <= 3.0) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
} else {
tmp = x + ((y * (0.004801250986110448 - (0.005643327829101921 / pow(z, 2.0)))) / (0.0692910599291889 + (-0.07512208616047561 / z)));
}
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 (z <= (-5.5d0)) then
tmp = x + (y * (0.0692910599291889d0 - (((-0.07512208616047561d0) + (0.4046220386999212d0 / z)) / z)))
else if (z <= 3.0d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * (0.0007936505811533442d0 + (z * (-0.0005951669793454025d0)))) - 0.00277777777751721d0))))
else
tmp = x + ((y * (0.004801250986110448d0 - (0.005643327829101921d0 / (z ** 2.0d0)))) / (0.0692910599291889d0 + ((-0.07512208616047561d0) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z)));
} else if (z <= 3.0) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
} else {
tmp = x + ((y * (0.004801250986110448 - (0.005643327829101921 / Math.pow(z, 2.0)))) / (0.0692910599291889 + (-0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z))) elif z <= 3.0: tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))) else: tmp = x + ((y * (0.004801250986110448 - (0.005643327829101921 / math.pow(z, 2.0)))) / (0.0692910599291889 + (-0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(-0.07512208616047561 + Float64(0.4046220386999212 / z)) / z)))); elseif (z <= 3.0) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * Float64(0.0007936505811533442 + Float64(z * -0.0005951669793454025))) - 0.00277777777751721))))); else tmp = Float64(x + Float64(Float64(y * Float64(0.004801250986110448 - Float64(0.005643327829101921 / (z ^ 2.0)))) / Float64(0.0692910599291889 + Float64(-0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z))); elseif (z <= 3.0) tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))); else tmp = x + ((y * (0.004801250986110448 - (0.005643327829101921 / (z ^ 2.0)))) / (0.0692910599291889 + (-0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(-0.07512208616047561 + N[(0.4046220386999212 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.0], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * N[(0.0007936505811533442 + N[(z * -0.0005951669793454025), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(0.004801250986110448 - N[(0.005643327829101921 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0692910599291889 + N[(-0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{-0.07512208616047561 + \frac{0.4046220386999212}{z}}{z}\right)\\
\mathbf{elif}\;z \leq 3:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot \left(0.0007936505811533442 + z \cdot -0.0005951669793454025\right) - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(0.004801250986110448 - \frac{0.005643327829101921}{{z}^{2}}\right)}{0.0692910599291889 + \frac{-0.07512208616047561}{z}}\\
\end{array}
\end{array}
if z < -5.5Initial program 36.4%
remove-double-neg36.4%
distribute-lft-neg-out36.4%
distribute-neg-frac36.4%
associate-/l*43.0%
distribute-rgt-neg-in43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-in43.0%
remove-double-neg43.0%
Simplified43.0%
Taylor expanded in z around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
sub-neg99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
if -5.5 < z < 3Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.8%
if 3 < z Initial program 43.8%
remove-double-neg43.8%
distribute-lft-neg-out43.8%
distribute-neg-frac43.8%
associate-/l*58.9%
distribute-rgt-neg-in58.9%
distribute-lft-neg-in58.9%
distribute-rgt-neg-in58.9%
remove-double-neg58.9%
Simplified58.9%
Taylor expanded in z around -inf 99.5%
mul-1-neg99.5%
unsub-neg99.5%
sub-neg99.5%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around inf 99.5%
*-commutative99.5%
flip--99.5%
associate-*l/99.4%
metadata-eval99.8%
frac-times99.8%
metadata-eval99.8%
pow299.8%
Applied egg-rr99.8%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+
x
(*
y
(-
0.0692910599291889
(/ (+ -0.07512208616047561 (/ 0.4046220386999212 z)) z))))
(if (<= z 3.1)
(+
x
(*
y
(+
0.08333333333333323
(*
z
(-
(* z (+ 0.0007936505811533442 (* z -0.0005951669793454025)))
0.00277777777751721)))))
(-
(+ x (+ (* y 0.0692910599291889) (* 0.4917317610505968 (/ y z))))
(* (/ y z) 0.4166096748901212)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z)));
} else if (z <= 3.1) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
} else {
tmp = (x + ((y * 0.0692910599291889) + (0.4917317610505968 * (y / z)))) - ((y / z) * 0.4166096748901212);
}
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 (z <= (-5.5d0)) then
tmp = x + (y * (0.0692910599291889d0 - (((-0.07512208616047561d0) + (0.4046220386999212d0 / z)) / z)))
else if (z <= 3.1d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * (0.0007936505811533442d0 + (z * (-0.0005951669793454025d0)))) - 0.00277777777751721d0))))
else
tmp = (x + ((y * 0.0692910599291889d0) + (0.4917317610505968d0 * (y / z)))) - ((y / z) * 0.4166096748901212d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z)));
} else if (z <= 3.1) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
} else {
tmp = (x + ((y * 0.0692910599291889) + (0.4917317610505968 * (y / z)))) - ((y / z) * 0.4166096748901212);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z))) elif z <= 3.1: tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))) else: tmp = (x + ((y * 0.0692910599291889) + (0.4917317610505968 * (y / z)))) - ((y / z) * 0.4166096748901212) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(-0.07512208616047561 + Float64(0.4046220386999212 / z)) / z)))); elseif (z <= 3.1) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * Float64(0.0007936505811533442 + Float64(z * -0.0005951669793454025))) - 0.00277777777751721))))); else tmp = Float64(Float64(x + Float64(Float64(y * 0.0692910599291889) + Float64(0.4917317610505968 * Float64(y / z)))) - Float64(Float64(y / z) * 0.4166096748901212)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z))); elseif (z <= 3.1) tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))); else tmp = (x + ((y * 0.0692910599291889) + (0.4917317610505968 * (y / z)))) - ((y / z) * 0.4166096748901212); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(-0.07512208616047561 + N[(0.4046220386999212 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * N[(0.0007936505811533442 + N[(z * -0.0005951669793454025), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] + N[(0.4917317610505968 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y / z), $MachinePrecision] * 0.4166096748901212), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{-0.07512208616047561 + \frac{0.4046220386999212}{z}}{z}\right)\\
\mathbf{elif}\;z \leq 3.1:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot \left(0.0007936505811533442 + z \cdot -0.0005951669793454025\right) - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(y \cdot 0.0692910599291889 + 0.4917317610505968 \cdot \frac{y}{z}\right)\right) - \frac{y}{z} \cdot 0.4166096748901212\\
\end{array}
\end{array}
if z < -5.5Initial program 36.4%
remove-double-neg36.4%
distribute-lft-neg-out36.4%
distribute-neg-frac36.4%
associate-/l*43.0%
distribute-rgt-neg-in43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-in43.0%
remove-double-neg43.0%
Simplified43.0%
Taylor expanded in z around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
sub-neg99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
if -5.5 < z < 3.10000000000000009Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.8%
if 3.10000000000000009 < z Initial program 43.8%
+-commutative43.8%
associate-/l*58.9%
fma-define58.9%
*-commutative58.9%
fma-define58.9%
fma-define58.9%
*-commutative58.9%
fma-define58.9%
Simplified58.9%
Taylor expanded in z around inf 99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+
x
(*
y
(-
0.0692910599291889
(/ (+ -0.07512208616047561 (/ 0.4046220386999212 z)) z))))
(if (<= z 3.0)
(+
x
(*
y
(+
0.08333333333333323
(*
z
(-
(* z (+ 0.0007936505811533442 (* z -0.0005951669793454025)))
0.00277777777751721)))))
(+ x (- (* y 0.0692910599291889) (/ (* y -0.07512208616047561) z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z)));
} else if (z <= 3.0) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
}
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 (z <= (-5.5d0)) then
tmp = x + (y * (0.0692910599291889d0 - (((-0.07512208616047561d0) + (0.4046220386999212d0 / z)) / z)))
else if (z <= 3.0d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * (0.0007936505811533442d0 + (z * (-0.0005951669793454025d0)))) - 0.00277777777751721d0))))
else
tmp = x + ((y * 0.0692910599291889d0) - ((y * (-0.07512208616047561d0)) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z)));
} else if (z <= 3.0) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z))) elif z <= 3.0: tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))) else: tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(-0.07512208616047561 + Float64(0.4046220386999212 / z)) / z)))); elseif (z <= 3.0) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * Float64(0.0007936505811533442 + Float64(z * -0.0005951669793454025))) - 0.00277777777751721))))); else tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(Float64(y * -0.07512208616047561) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z))); elseif (z <= 3.0) tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))); else tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(-0.07512208616047561 + N[(0.4046220386999212 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.0], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * N[(0.0007936505811533442 + N[(z * -0.0005951669793454025), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{-0.07512208616047561 + \frac{0.4046220386999212}{z}}{z}\right)\\
\mathbf{elif}\;z \leq 3:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot \left(0.0007936505811533442 + z \cdot -0.0005951669793454025\right) - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.5Initial program 36.4%
remove-double-neg36.4%
distribute-lft-neg-out36.4%
distribute-neg-frac36.4%
associate-/l*43.0%
distribute-rgt-neg-in43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-in43.0%
remove-double-neg43.0%
Simplified43.0%
Taylor expanded in z around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
sub-neg99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
if -5.5 < z < 3Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.8%
if 3 < z Initial program 43.8%
remove-double-neg43.8%
distribute-lft-neg-out43.8%
distribute-neg-frac43.8%
associate-/l*58.9%
distribute-rgt-neg-in58.9%
distribute-lft-neg-in58.9%
distribute-rgt-neg-in58.9%
remove-double-neg58.9%
Simplified58.9%
Taylor expanded in z around -inf 99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.5) (not (<= z 4.4)))
(+ x (- (* y 0.0692910599291889) (/ (* y -0.07512208616047561) z)))
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 4.4)) {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
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 ((z <= (-5.5d0)) .or. (.not. (z <= 4.4d0))) then
tmp = x + ((y * 0.0692910599291889d0) - ((y * (-0.07512208616047561d0)) / z))
else
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 4.4)) {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 4.4): tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)) else: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 4.4)) tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(Float64(y * -0.07512208616047561) / z))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 4.4))) tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)); else tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 4.4]], $MachinePrecision]], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 4.4\right):\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\end{array}
\end{array}
if z < -5.5 or 4.4000000000000004 < z Initial program 39.8%
remove-double-neg39.8%
distribute-lft-neg-out39.8%
distribute-neg-frac39.8%
associate-/l*50.3%
distribute-rgt-neg-in50.3%
distribute-lft-neg-in50.3%
distribute-rgt-neg-in50.3%
remove-double-neg50.3%
Simplified50.3%
Taylor expanded in z around -inf 99.5%
+-commutative99.5%
mul-1-neg99.5%
unsub-neg99.5%
distribute-rgt-out--99.5%
metadata-eval99.5%
Simplified99.5%
if -5.5 < z < 4.4000000000000004Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.7%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+
x
(*
y
(-
0.0692910599291889
(/ (+ -0.07512208616047561 (/ 0.4046220386999212 z)) z))))
(if (<= z 4.4)
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
(+ x (- (* y 0.0692910599291889) (/ (* y -0.07512208616047561) z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z)));
} else if (z <= 4.4) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
}
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 (z <= (-5.5d0)) then
tmp = x + (y * (0.0692910599291889d0 - (((-0.07512208616047561d0) + (0.4046220386999212d0 / z)) / z)))
else if (z <= 4.4d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
else
tmp = x + ((y * 0.0692910599291889d0) - ((y * (-0.07512208616047561d0)) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z)));
} else if (z <= 4.4) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z))) elif z <= 4.4: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) else: tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(-0.07512208616047561 + Float64(0.4046220386999212 / z)) / z)))); elseif (z <= 4.4) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); else tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(Float64(y * -0.07512208616047561) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (y * (0.0692910599291889 - ((-0.07512208616047561 + (0.4046220386999212 / z)) / z))); elseif (z <= 4.4) tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); else tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(-0.07512208616047561 + N[(0.4046220386999212 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{-0.07512208616047561 + \frac{0.4046220386999212}{z}}{z}\right)\\
\mathbf{elif}\;z \leq 4.4:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.5Initial program 36.4%
remove-double-neg36.4%
distribute-lft-neg-out36.4%
distribute-neg-frac36.4%
associate-/l*43.0%
distribute-rgt-neg-in43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-in43.0%
remove-double-neg43.0%
Simplified43.0%
Taylor expanded in z around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
sub-neg99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
if -5.5 < z < 4.4000000000000004Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.7%
if 4.4000000000000004 < z Initial program 43.8%
remove-double-neg43.8%
distribute-lft-neg-out43.8%
distribute-neg-frac43.8%
associate-/l*58.9%
distribute-rgt-neg-in58.9%
distribute-lft-neg-in58.9%
distribute-rgt-neg-in58.9%
remove-double-neg58.9%
Simplified58.9%
Taylor expanded in z around -inf 99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 5.0))) (+ x (- (* y 0.0692910599291889) (/ (* y -0.07512208616047561) z))) (+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.0)) {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
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 ((z <= (-5.5d0)) .or. (.not. (z <= 5.0d0))) then
tmp = x + ((y * 0.0692910599291889d0) - ((y * (-0.07512208616047561d0)) / z))
else
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.0)) {
tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 5.0): tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)) else: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 5.0)) tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(Float64(y * -0.07512208616047561) / z))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 5.0))) tmp = x + ((y * 0.0692910599291889) - ((y * -0.07512208616047561) / z)); else tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 5.0]], $MachinePrecision]], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 5\right):\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - \frac{y \cdot -0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\end{array}
\end{array}
if z < -5.5 or 5 < z Initial program 39.8%
remove-double-neg39.8%
distribute-lft-neg-out39.8%
distribute-neg-frac39.8%
associate-/l*50.3%
distribute-rgt-neg-in50.3%
distribute-lft-neg-in50.3%
distribute-rgt-neg-in50.3%
remove-double-neg50.3%
Simplified50.3%
Taylor expanded in z around -inf 99.5%
+-commutative99.5%
mul-1-neg99.5%
unsub-neg99.5%
distribute-rgt-out--99.5%
metadata-eval99.5%
Simplified99.5%
if -5.5 < z < 5Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.4%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 5.0))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.0)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
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 ((z <= (-5.5d0)) .or. (.not. (z <= 5.0d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.0)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 5.0): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 5.0)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 5.0))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 5.0]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 5\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\end{array}
\end{array}
if z < -5.5 or 5 < z Initial program 39.8%
remove-double-neg39.8%
distribute-lft-neg-out39.8%
distribute-neg-frac39.8%
associate-/l*50.3%
distribute-rgt-neg-in50.3%
distribute-lft-neg-in50.3%
distribute-rgt-neg-in50.3%
remove-double-neg50.3%
Simplified50.3%
Taylor expanded in z around inf 99.4%
associate-*r/99.4%
metadata-eval99.4%
Simplified99.4%
if -5.5 < z < 5Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.4%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 5.2))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.2)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * 0.08333333333333323);
}
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 ((z <= (-5.5d0)) .or. (.not. (z <= 5.2d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * 0.08333333333333323d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.2)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 5.2): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 5.2)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * 0.08333333333333323)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 5.2))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 5.2]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 5.2\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.5 or 5.20000000000000018 < z Initial program 39.8%
remove-double-neg39.8%
distribute-lft-neg-out39.8%
distribute-neg-frac39.8%
associate-/l*50.3%
distribute-rgt-neg-in50.3%
distribute-lft-neg-in50.3%
distribute-rgt-neg-in50.3%
remove-double-neg50.3%
Simplified50.3%
Taylor expanded in z around inf 99.4%
associate-*r/99.4%
metadata-eval99.4%
Simplified99.4%
if -5.5 < z < 5.20000000000000018Initial program 99.7%
+-commutative99.7%
associate-/l*99.9%
fma-define99.9%
*-commutative99.9%
fma-define99.9%
fma-define99.9%
*-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.1%
+-commutative99.1%
Simplified99.1%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (<= z -5.5)
(+ x (* y (/ (+ (* z 0.0692910599291889) 0.07512208616047561) z)))
(if (<= z 5.0)
(+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (((z * 0.0692910599291889) + 0.07512208616047561) / z));
} else if (z <= 5.0) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
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 (z <= (-5.5d0)) then
tmp = x + (y * (((z * 0.0692910599291889d0) + 0.07512208616047561d0) / z))
else if (z <= 5.0d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.5) {
tmp = x + (y * (((z * 0.0692910599291889) + 0.07512208616047561) / z));
} else if (z <= 5.0) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.5: tmp = x + (y * (((z * 0.0692910599291889) + 0.07512208616047561) / z)) elif z <= 5.0: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.5) tmp = Float64(x + Float64(y * Float64(Float64(Float64(z * 0.0692910599291889) + 0.07512208616047561) / z))); elseif (z <= 5.0) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.5) tmp = x + (y * (((z * 0.0692910599291889) + 0.07512208616047561) / z)); elseif (z <= 5.0) tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.5], N[(x + N[(y * N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.0], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5:\\
\;\;\;\;x + y \cdot \frac{z \cdot 0.0692910599291889 + 0.07512208616047561}{z}\\
\mathbf{elif}\;z \leq 5:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -5.5Initial program 36.4%
remove-double-neg36.4%
distribute-lft-neg-out36.4%
distribute-neg-frac36.4%
associate-/l*43.0%
distribute-rgt-neg-in43.0%
distribute-lft-neg-in43.0%
distribute-rgt-neg-in43.0%
remove-double-neg43.0%
Simplified43.0%
Taylor expanded in z around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
sub-neg99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 99.3%
Taylor expanded in z around 0 99.3%
if -5.5 < z < 5Initial program 99.7%
remove-double-neg99.7%
distribute-lft-neg-out99.7%
distribute-neg-frac99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.4%
if 5 < z Initial program 43.8%
remove-double-neg43.8%
distribute-lft-neg-out43.8%
distribute-neg-frac43.8%
associate-/l*58.9%
distribute-rgt-neg-in58.9%
distribute-lft-neg-in58.9%
distribute-rgt-neg-in58.9%
remove-double-neg58.9%
Simplified58.9%
Taylor expanded in z around inf 99.5%
associate-*r/99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (<= x -1.3e-43)
x
(if (<= x -3.9e-174)
(* y 0.0692910599291889)
(if (<= x 7.5e-117) (* y 0.08333333333333323) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.3e-43) {
tmp = x;
} else if (x <= -3.9e-174) {
tmp = y * 0.0692910599291889;
} else if (x <= 7.5e-117) {
tmp = y * 0.08333333333333323;
} else {
tmp = 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 <= (-1.3d-43)) then
tmp = x
else if (x <= (-3.9d-174)) then
tmp = y * 0.0692910599291889d0
else if (x <= 7.5d-117) then
tmp = y * 0.08333333333333323d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.3e-43) {
tmp = x;
} else if (x <= -3.9e-174) {
tmp = y * 0.0692910599291889;
} else if (x <= 7.5e-117) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.3e-43: tmp = x elif x <= -3.9e-174: tmp = y * 0.0692910599291889 elif x <= 7.5e-117: tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.3e-43) tmp = x; elseif (x <= -3.9e-174) tmp = Float64(y * 0.0692910599291889); elseif (x <= 7.5e-117) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.3e-43) tmp = x; elseif (x <= -3.9e-174) tmp = y * 0.0692910599291889; elseif (x <= 7.5e-117) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.3e-43], x, If[LessEqual[x, -3.9e-174], N[(y * 0.0692910599291889), $MachinePrecision], If[LessEqual[x, 7.5e-117], N[(y * 0.08333333333333323), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -3.9 \cdot 10^{-174}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-117}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.3e-43 or 7.50000000000000066e-117 < x Initial program 76.0%
+-commutative76.0%
associate-/l*81.3%
fma-define81.3%
*-commutative81.3%
fma-define81.3%
fma-define81.3%
*-commutative81.3%
fma-define81.3%
Simplified81.3%
Taylor expanded in y around 0 70.6%
if -1.3e-43 < x < -3.8999999999999999e-174Initial program 66.4%
+-commutative66.4%
associate-/l*69.0%
fma-define69.0%
*-commutative69.0%
fma-define69.0%
fma-define69.0%
*-commutative69.0%
fma-define69.0%
Simplified69.0%
Taylor expanded in z around inf 77.5%
+-commutative77.5%
Simplified77.5%
Taylor expanded in y around inf 58.9%
*-commutative58.9%
Simplified58.9%
if -3.8999999999999999e-174 < x < 7.50000000000000066e-117Initial program 76.0%
+-commutative76.0%
associate-/l*79.4%
fma-define79.4%
*-commutative79.4%
fma-define79.4%
fma-define79.4%
*-commutative79.4%
fma-define79.4%
Simplified79.4%
Taylor expanded in x around inf 53.9%
+-commutative53.9%
times-frac55.6%
+-commutative55.6%
+-commutative55.6%
*-commutative55.6%
fma-define55.6%
fma-define55.6%
+-commutative55.6%
+-commutative55.6%
fma-undefine55.6%
fma-define55.6%
Simplified55.6%
Taylor expanded in x around 0 64.5%
Taylor expanded in z around 0 60.7%
Final simplification66.7%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 5.5))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.5)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
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 ((z <= (-5.5d0)) .or. (.not. (z <= 5.5d0))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = x + (y * 0.08333333333333323d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.5)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.5) or not (z <= 5.5): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 5.5)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(y * 0.08333333333333323)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.5) || ~((z <= 5.5))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 5.5]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 5.5\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.5 or 5.5 < z Initial program 39.8%
+-commutative39.8%
associate-/l*50.3%
fma-define50.3%
*-commutative50.3%
fma-define50.3%
fma-define50.3%
*-commutative50.3%
fma-define50.3%
Simplified50.3%
Taylor expanded in z around inf 99.0%
+-commutative99.0%
Simplified99.0%
if -5.5 < z < 5.5Initial program 99.7%
+-commutative99.7%
associate-/l*99.9%
fma-define99.9%
*-commutative99.9%
fma-define99.9%
fma-define99.9%
*-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.1%
+-commutative99.1%
Simplified99.1%
Final simplification99.1%
(FPCore (x y z) :precision binary64 (if (or (<= x -4.8e-188) (not (<= x 3e-221))) (+ x (* y 0.0692910599291889)) (* y 0.08333333333333323)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -4.8e-188) || !(x <= 3e-221)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
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 <= (-4.8d-188)) .or. (.not. (x <= 3d-221))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = y * 0.08333333333333323d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -4.8e-188) || !(x <= 3e-221)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -4.8e-188) or not (x <= 3e-221): tmp = x + (y * 0.0692910599291889) else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -4.8e-188) || !(x <= 3e-221)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(y * 0.08333333333333323); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -4.8e-188) || ~((x <= 3e-221))) tmp = x + (y * 0.0692910599291889); else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -4.8e-188], N[Not[LessEqual[x, 3e-221]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(y * 0.08333333333333323), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{-188} \lor \neg \left(x \leq 3 \cdot 10^{-221}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if x < -4.8e-188 or 3.0000000000000002e-221 < x Initial program 74.2%
+-commutative74.2%
associate-/l*78.5%
fma-define78.5%
*-commutative78.5%
fma-define78.5%
fma-define78.5%
*-commutative78.5%
fma-define78.5%
Simplified78.5%
Taylor expanded in z around inf 84.3%
+-commutative84.3%
Simplified84.3%
if -4.8e-188 < x < 3.0000000000000002e-221Initial program 77.5%
+-commutative77.5%
associate-/l*83.0%
fma-define83.0%
*-commutative83.0%
fma-define83.0%
fma-define83.0%
*-commutative83.0%
fma-define83.0%
Simplified83.0%
Taylor expanded in x around inf 46.5%
+-commutative46.5%
times-frac49.2%
+-commutative49.2%
+-commutative49.2%
*-commutative49.2%
fma-define49.2%
fma-define49.2%
+-commutative49.2%
+-commutative49.2%
fma-undefine49.2%
fma-define49.2%
Simplified49.2%
Taylor expanded in x around 0 74.5%
Taylor expanded in z around 0 71.7%
Final simplification82.5%
(FPCore (x y z) :precision binary64 (if (<= x -3.5e-77) x (if (<= x 5.1e-120) (* y 0.08333333333333323) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -3.5e-77) {
tmp = x;
} else if (x <= 5.1e-120) {
tmp = y * 0.08333333333333323;
} else {
tmp = 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 <= (-3.5d-77)) then
tmp = x
else if (x <= 5.1d-120) then
tmp = y * 0.08333333333333323d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3.5e-77) {
tmp = x;
} else if (x <= 5.1e-120) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3.5e-77: tmp = x elif x <= 5.1e-120: tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3.5e-77) tmp = x; elseif (x <= 5.1e-120) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3.5e-77) tmp = x; elseif (x <= 5.1e-120) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3.5e-77], x, If[LessEqual[x, 5.1e-120], N[(y * 0.08333333333333323), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-77}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{-120}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.50000000000000013e-77 or 5.0999999999999998e-120 < x Initial program 76.5%
+-commutative76.5%
associate-/l*81.6%
fma-define81.6%
*-commutative81.6%
fma-define81.6%
fma-define81.6%
*-commutative81.6%
fma-define81.6%
Simplified81.6%
Taylor expanded in y around 0 69.1%
if -3.50000000000000013e-77 < x < 5.0999999999999998e-120Initial program 71.0%
+-commutative71.0%
associate-/l*74.4%
fma-define74.4%
*-commutative74.4%
fma-define74.4%
fma-define74.4%
*-commutative74.4%
fma-define74.4%
Simplified74.4%
Taylor expanded in x around inf 51.8%
+-commutative51.8%
times-frac52.9%
+-commutative52.9%
+-commutative52.9%
*-commutative52.9%
fma-define52.9%
fma-define52.9%
+-commutative52.9%
+-commutative52.9%
fma-undefine52.9%
fma-define52.9%
Simplified52.9%
Taylor expanded in x around 0 58.6%
Taylor expanded in z around 0 54.3%
Final simplification64.1%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 74.7%
+-commutative74.7%
associate-/l*79.1%
fma-define79.1%
*-commutative79.1%
fma-define79.1%
fma-define79.1%
*-commutative79.1%
fma-define79.1%
Simplified79.1%
Taylor expanded in y around 0 51.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y)
(- (/ (* 0.40462203869992125 y) (* z z)) x))))
(if (< z -8120153.652456675)
t_0
(if (< z 6.576118972787377e+20)
(+
x
(*
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
t_0))))
double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} 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 = (((0.07512208616047561d0 / z) + 0.0692910599291889d0) * y) - (((0.40462203869992125d0 * y) / (z * z)) - x)
if (z < (-8120153.652456675d0)) then
tmp = t_0
else if (z < 6.576118972787377d+20) then
tmp = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) * (1.0d0 / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x) tmp = 0 if z < -8120153.652456675: tmp = t_0 elif z < 6.576118972787377e+20: tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(0.07512208616047561 / z) + 0.0692910599291889) * y) - Float64(Float64(Float64(0.40462203869992125 * y) / Float64(z * z)) - x)) tmp = 0.0 if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * Float64(1.0 / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x); tmp = 0.0; if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(0.07512208616047561 / z), $MachinePrecision] + 0.0692910599291889), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(0.40462203869992125 * y), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -8120153.652456675], t$95$0, If[Less[z, 6.576118972787377e+20], N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{0.07512208616047561}{z} + 0.0692910599291889\right) \cdot y - \left(\frac{0.40462203869992125 \cdot y}{z \cdot z} - x\right)\\
\mathbf{if}\;z < -8120153.652456675:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z < 6.576118972787377 \cdot 10^{+20}:\\
\;\;\;\;x + \left(y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)\right) \cdot \frac{1}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024087
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(if (< z -8120153.652456675) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x)) (if (< z 6.576118972787377e+20) (+ x (* (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304)))) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x))))
(+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))