
(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 17 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))
1e+290)
(+
x
(*
y
(/
(fma (fma z 0.0692910599291889 0.4917317610505968) z 0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+ x (/ y 14.431876219268936))))
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)) <= 1e+290) {
tmp = x + (y * (fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} else {
tmp = x + (y / 14.431876219268936);
}
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)) <= 1e+290) 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(y / 14.431876219268936)); 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], 1e+290], 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[(y / 14.431876219268936), $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 10^{+290}:\\
\;\;\;\;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}{14.431876219268936}\\
\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))) < 1.00000000000000006e290Initial program 95.1%
remove-double-neg95.1%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
if 1.00000000000000006e290 < (/.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.7%
+-commutative0.7%
*-commutative0.7%
associate-/l*13.1%
fma-define13.1%
*-commutative13.1%
fma-define13.1%
fma-define13.1%
*-commutative13.1%
fma-define13.1%
Simplified13.1%
fma-undefine13.1%
fma-undefine13.1%
*-commutative13.1%
fma-define13.1%
fma-undefine13.1%
*-commutative13.1%
associate-*r/0.7%
associate-*l/13.1%
*-commutative13.1%
clear-num13.1%
un-div-inv13.2%
*-commutative13.2%
fma-undefine13.2%
fma-define13.2%
*-commutative13.2%
fma-undefine13.2%
Applied egg-rr13.2%
Taylor expanded in z around inf 100.0%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (or (<= z -220000000.0) (not (<= z 250000000.0)))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(+
x
(/
(+
(* y 0.279195317918525)
(* z (+ (* 0.0692910599291889 (* y z)) (* y 0.4917317610505968))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -220000000.0) || !(z <= 250000000.0)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
}
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 <= (-220000000.0d0)) .or. (.not. (z <= 250000000.0d0))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else
tmp = x + (((y * 0.279195317918525d0) + (z * ((0.0692910599291889d0 * (y * z)) + (y * 0.4917317610505968d0)))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -220000000.0) || !(z <= 250000000.0)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -220000000.0) or not (z <= 250000000.0): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) else: tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -220000000.0) || !(z <= 250000000.0)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); else tmp = Float64(x + Float64(Float64(Float64(y * 0.279195317918525) + Float64(z * Float64(Float64(0.0692910599291889 * Float64(y * z)) + Float64(y * 0.4917317610505968)))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -220000000.0) || ~((z <= 250000000.0))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); else tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -220000000.0], N[Not[LessEqual[z, 250000000.0]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * 0.279195317918525), $MachinePrecision] + N[(z * N[(N[(0.0692910599291889 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -220000000 \lor \neg \left(z \leq 250000000\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot 0.279195317918525 + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + y \cdot 0.4917317610505968\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\end{array}
\end{array}
if z < -2.2e8 or 2.5e8 < z Initial program 37.6%
+-commutative37.6%
*-commutative37.6%
associate-/l*50.6%
fma-define50.6%
*-commutative50.6%
fma-define50.6%
fma-define50.6%
*-commutative50.6%
fma-define50.6%
Simplified50.6%
fma-undefine50.6%
fma-undefine50.6%
*-commutative50.6%
fma-define50.6%
fma-undefine50.6%
*-commutative50.6%
associate-*r/37.6%
associate-*l/51.3%
*-commutative51.3%
clear-num51.3%
un-div-inv51.4%
*-commutative51.4%
fma-undefine51.4%
fma-define51.4%
*-commutative51.4%
fma-undefine51.4%
Applied egg-rr51.4%
Taylor expanded in z around inf 100.0%
associate-*r/100.0%
metadata-eval100.0%
Simplified100.0%
if -2.2e8 < z < 2.5e8Initial program 99.6%
Taylor expanded in z around 0 99.6%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -260000000.0)
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(if (<= z 35000.0)
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)
(+
x
(/
y
(+
14.431876219268936
(/
(-
(/ (+ 101.23733352003822 (/ -655.3980091051341 z)) z)
15.646356830292042)
z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -260000000.0) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else if (z <= 35000.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / 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 <= (-260000000.0d0)) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else if (z <= 35000.0d0) then
tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
else
tmp = x + (y / (14.431876219268936d0 + ((((101.23733352003822d0 + ((-655.3980091051341d0) / z)) / z) - 15.646356830292042d0) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -260000000.0) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else if (z <= 35000.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -260000000.0: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) elif z <= 35000.0: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x else: tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -260000000.0) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); elseif (z <= 35000.0) tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) + x); else tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(Float64(Float64(101.23733352003822 + Float64(-655.3980091051341 / z)) / z) - 15.646356830292042) / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -260000000.0) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); elseif (z <= 35000.0) tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; else tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -260000000.0], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 35000.0], N[(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] + x), $MachinePrecision], N[(x + N[(y / N[(14.431876219268936 + N[(N[(N[(N[(101.23733352003822 + N[(-655.3980091051341 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - 15.646356830292042), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -260000000:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{elif}\;z \leq 35000:\\
\;\;\;\;\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} + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 + \frac{\frac{101.23733352003822 + \frac{-655.3980091051341}{z}}{z} - 15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -2.6e8Initial program 40.4%
+-commutative40.4%
*-commutative40.4%
associate-/l*57.0%
fma-define57.0%
*-commutative57.0%
fma-define57.0%
fma-define57.0%
*-commutative57.0%
fma-define57.0%
Simplified57.0%
fma-undefine57.0%
fma-undefine57.0%
*-commutative57.0%
fma-define57.0%
fma-undefine57.0%
*-commutative57.0%
associate-*r/40.4%
associate-*l/56.9%
*-commutative56.9%
clear-num56.9%
un-div-inv56.9%
*-commutative56.9%
fma-undefine56.9%
fma-define56.9%
*-commutative56.9%
fma-undefine56.9%
Applied egg-rr56.9%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
if -2.6e8 < z < 35000Initial program 99.6%
if 35000 < z Initial program 36.2%
+-commutative36.2%
*-commutative36.2%
associate-/l*46.0%
fma-define46.0%
*-commutative46.0%
fma-define46.0%
fma-define46.0%
*-commutative46.0%
fma-define46.0%
Simplified46.0%
fma-undefine46.0%
fma-undefine46.0%
*-commutative46.0%
fma-define46.0%
fma-undefine46.0%
*-commutative46.0%
associate-*r/36.3%
associate-*l/47.4%
*-commutative47.4%
clear-num47.4%
un-div-inv47.5%
*-commutative47.5%
fma-undefine47.5%
fma-define47.5%
*-commutative47.5%
fma-undefine47.5%
Applied egg-rr47.5%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
mul-1-neg100.0%
unsub-neg100.0%
sub-neg100.0%
associate-*r/100.0%
metadata-eval100.0%
distribute-neg-frac100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -16500000.0)
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(if (<= z 0.036)
(+
x
(/
y
(+
12.000000000000014
(* z (+ 0.39999999996247915 (* z -0.10095235035524991))))))
(+
x
(/
y
(+
14.431876219268936
(/
(-
(/ (+ 101.23733352003822 (/ -655.3980091051341 z)) z)
15.646356830292042)
z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -16500000.0) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else if (z <= 0.036) {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991)))));
} else {
tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / 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 <= (-16500000.0d0)) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else if (z <= 0.036d0) then
tmp = x + (y / (12.000000000000014d0 + (z * (0.39999999996247915d0 + (z * (-0.10095235035524991d0))))))
else
tmp = x + (y / (14.431876219268936d0 + ((((101.23733352003822d0 + ((-655.3980091051341d0) / z)) / z) - 15.646356830292042d0) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -16500000.0) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else if (z <= 0.036) {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991)))));
} else {
tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -16500000.0: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) elif z <= 0.036: tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991))))) else: tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -16500000.0) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); elseif (z <= 0.036) tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * Float64(0.39999999996247915 + Float64(z * -0.10095235035524991)))))); else tmp = Float64(x + Float64(y / Float64(14.431876219268936 + Float64(Float64(Float64(Float64(101.23733352003822 + Float64(-655.3980091051341 / z)) / z) - 15.646356830292042) / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -16500000.0) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); elseif (z <= 0.036) tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991))))); else tmp = x + (y / (14.431876219268936 + ((((101.23733352003822 + (-655.3980091051341 / z)) / z) - 15.646356830292042) / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -16500000.0], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.036], N[(x + N[(y / N[(12.000000000000014 + N[(z * N[(0.39999999996247915 + N[(z * -0.10095235035524991), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(14.431876219268936 + N[(N[(N[(N[(101.23733352003822 + N[(-655.3980091051341 / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - 15.646356830292042), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16500000:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{elif}\;z \leq 0.036:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot \left(0.39999999996247915 + z \cdot -0.10095235035524991\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936 + \frac{\frac{101.23733352003822 + \frac{-655.3980091051341}{z}}{z} - 15.646356830292042}{z}}\\
\end{array}
\end{array}
if z < -1.65e7Initial program 40.4%
+-commutative40.4%
*-commutative40.4%
associate-/l*57.0%
fma-define57.0%
*-commutative57.0%
fma-define57.0%
fma-define57.0%
*-commutative57.0%
fma-define57.0%
Simplified57.0%
fma-undefine57.0%
fma-undefine57.0%
*-commutative57.0%
fma-define57.0%
fma-undefine57.0%
*-commutative57.0%
associate-*r/40.4%
associate-*l/56.9%
*-commutative56.9%
clear-num56.9%
un-div-inv56.9%
*-commutative56.9%
fma-undefine56.9%
fma-define56.9%
*-commutative56.9%
fma-undefine56.9%
Applied egg-rr56.9%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
fma-undefine99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
associate-*r/99.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.2%
un-div-inv99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 100.0%
*-commutative100.0%
Simplified100.0%
if 0.0359999999999999973 < z Initial program 38.9%
+-commutative38.9%
*-commutative38.9%
associate-/l*48.3%
fma-define48.3%
*-commutative48.3%
fma-define48.3%
fma-define48.3%
*-commutative48.3%
fma-define48.3%
Simplified48.3%
fma-undefine48.3%
fma-undefine48.3%
*-commutative48.3%
fma-define48.3%
fma-undefine48.3%
*-commutative48.3%
associate-*r/39.0%
associate-*l/49.6%
*-commutative49.6%
clear-num49.6%
un-div-inv49.7%
*-commutative49.7%
fma-undefine49.7%
fma-define49.7%
*-commutative49.7%
fma-undefine49.7%
Applied egg-rr49.7%
Taylor expanded in z around -inf 98.6%
mul-1-neg98.6%
unsub-neg98.6%
mul-1-neg98.6%
unsub-neg98.6%
sub-neg98.6%
associate-*r/98.6%
metadata-eval98.6%
distribute-neg-frac98.6%
metadata-eval98.6%
Simplified98.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= x -2.7e-24)
x
(if (or (<= x -2.3e-63) (and (not (<= x -3.7e-150)) (<= x 1.6e-120)))
(* y 0.08333333333333323)
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -2.7e-24) {
tmp = x;
} else if ((x <= -2.3e-63) || (!(x <= -3.7e-150) && (x <= 1.6e-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 <= (-2.7d-24)) then
tmp = x
else if ((x <= (-2.3d-63)) .or. (.not. (x <= (-3.7d-150))) .and. (x <= 1.6d-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 <= -2.7e-24) {
tmp = x;
} else if ((x <= -2.3e-63) || (!(x <= -3.7e-150) && (x <= 1.6e-120))) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2.7e-24: tmp = x elif (x <= -2.3e-63) or (not (x <= -3.7e-150) and (x <= 1.6e-120)): tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2.7e-24) tmp = x; elseif ((x <= -2.3e-63) || (!(x <= -3.7e-150) && (x <= 1.6e-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 <= -2.7e-24) tmp = x; elseif ((x <= -2.3e-63) || (~((x <= -3.7e-150)) && (x <= 1.6e-120))) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2.7e-24], x, If[Or[LessEqual[x, -2.3e-63], And[N[Not[LessEqual[x, -3.7e-150]], $MachinePrecision], LessEqual[x, 1.6e-120]]], N[(y * 0.08333333333333323), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{-24}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-63} \lor \neg \left(x \leq -3.7 \cdot 10^{-150}\right) \land x \leq 1.6 \cdot 10^{-120}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.70000000000000007e-24 or -2.3e-63 < x < -3.70000000000000001e-150 or 1.6e-120 < x Initial program 70.3%
+-commutative70.3%
*-commutative70.3%
associate-/l*74.7%
fma-define74.7%
*-commutative74.7%
fma-define74.7%
fma-define74.7%
*-commutative74.7%
fma-define74.7%
Simplified74.7%
Taylor expanded in y around 0 71.8%
if -2.70000000000000007e-24 < x < -2.3e-63 or -3.70000000000000001e-150 < x < 1.6e-120Initial program 69.6%
+-commutative69.6%
*-commutative69.6%
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 z around 0 62.6%
+-commutative62.6%
Simplified62.6%
Taylor expanded in y around inf 55.7%
Final simplification66.5%
(FPCore (x y z)
:precision binary64
(if (or (<= z -16500000.0) (not (<= z 0.036)))
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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 <= (-16500000.0d0)) .or. (.not. (z <= 0.036d0))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / 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 <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -16500000.0) or not (z <= 0.036): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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 <= -16500000.0) || !(z <= 0.036)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / 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 <= -16500000.0) || ~((z <= 0.036))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / 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, -16500000.0], N[Not[LessEqual[z, 0.036]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $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 -16500000 \lor \neg \left(z \leq 0.036\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\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 < -1.65e7 or 0.0359999999999999973 < z Initial program 39.6%
+-commutative39.6%
*-commutative39.6%
associate-/l*52.1%
fma-define52.1%
*-commutative52.1%
fma-define52.1%
fma-define52.1%
*-commutative52.1%
fma-define52.1%
Simplified52.1%
fma-undefine52.1%
fma-undefine52.1%
*-commutative52.1%
fma-define52.1%
fma-undefine52.1%
*-commutative52.1%
associate-*r/39.6%
associate-*l/52.9%
*-commutative52.9%
clear-num52.9%
un-div-inv52.9%
*-commutative52.9%
fma-undefine52.9%
fma-define52.9%
*-commutative52.9%
fma-undefine52.9%
Applied egg-rr52.9%
Taylor expanded in z around inf 98.7%
associate-*r/98.7%
metadata-eval98.7%
Simplified98.7%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
remove-double-neg99.6%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (<= z -16500000.0)
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(if (<= z 0.036)
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
(+
x
(*
y
(-
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -16500000.0) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else if (z <= 0.036) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -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 <= (-16500000.0d0)) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else if (z <= 0.036d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
else
tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -16500000.0) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else if (z <= 0.036) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -16500000.0: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) elif z <= 0.036: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) else: tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -16500000.0) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); elseif (z <= 0.036) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -16500000.0) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); elseif (z <= 0.036) tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); else tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -16500000.0], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.036], 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[(y * N[(0.0692910599291889 - N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16500000:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{elif}\;z \leq 0.036:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -1.65e7Initial program 40.4%
+-commutative40.4%
*-commutative40.4%
associate-/l*57.0%
fma-define57.0%
*-commutative57.0%
fma-define57.0%
fma-define57.0%
*-commutative57.0%
fma-define57.0%
Simplified57.0%
fma-undefine57.0%
fma-undefine57.0%
*-commutative57.0%
fma-define57.0%
fma-undefine57.0%
*-commutative57.0%
associate-*r/40.4%
associate-*l/56.9%
*-commutative56.9%
clear-num56.9%
un-div-inv56.9%
*-commutative56.9%
fma-undefine56.9%
fma-define56.9%
*-commutative56.9%
fma-undefine56.9%
Applied egg-rr56.9%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
remove-double-neg99.6%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
if 0.0359999999999999973 < z Initial program 38.9%
remove-double-neg38.9%
associate-/l*49.6%
distribute-rgt-neg-in49.6%
distribute-lft-neg-in49.6%
distribute-lft-neg-in49.6%
distribute-rgt-neg-in49.6%
remove-double-neg49.6%
fma-define49.6%
fma-define49.6%
fma-define49.6%
Simplified49.6%
Taylor expanded in z around -inf 97.8%
mul-1-neg97.8%
unsub-neg97.8%
sub-neg97.8%
associate-*r/97.8%
metadata-eval97.8%
metadata-eval97.8%
Simplified97.8%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (<= z -16500000.0)
(+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z))))
(if (<= z 0.036)
(+
x
(/
y
(+
12.000000000000014
(* z (+ 0.39999999996247915 (* z -0.10095235035524991))))))
(+
x
(*
y
(-
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -16500000.0) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else if (z <= 0.036) {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991)))));
} else {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -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 <= (-16500000.0d0)) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else if (z <= 0.036d0) then
tmp = x + (y / (12.000000000000014d0 + (z * (0.39999999996247915d0 + (z * (-0.10095235035524991d0))))))
else
tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -16500000.0) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else if (z <= 0.036) {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991)))));
} else {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -16500000.0: tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) elif z <= 0.036: tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991))))) else: tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -16500000.0) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); elseif (z <= 0.036) tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * Float64(0.39999999996247915 + Float64(z * -0.10095235035524991)))))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -16500000.0) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); elseif (z <= 0.036) tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991))))); else tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -16500000.0], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.036], N[(x + N[(y / N[(12.000000000000014 + N[(z * N[(0.39999999996247915 + N[(z * -0.10095235035524991), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16500000:\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{elif}\;z \leq 0.036:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot \left(0.39999999996247915 + z \cdot -0.10095235035524991\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -1.65e7Initial program 40.4%
+-commutative40.4%
*-commutative40.4%
associate-/l*57.0%
fma-define57.0%
*-commutative57.0%
fma-define57.0%
fma-define57.0%
*-commutative57.0%
fma-define57.0%
Simplified57.0%
fma-undefine57.0%
fma-undefine57.0%
*-commutative57.0%
fma-define57.0%
fma-undefine57.0%
*-commutative57.0%
associate-*r/40.4%
associate-*l/56.9%
*-commutative56.9%
clear-num56.9%
un-div-inv56.9%
*-commutative56.9%
fma-undefine56.9%
fma-define56.9%
*-commutative56.9%
fma-undefine56.9%
Applied egg-rr56.9%
Taylor expanded in z around inf 99.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
fma-undefine99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
associate-*r/99.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.2%
un-div-inv99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 100.0%
*-commutative100.0%
Simplified100.0%
if 0.0359999999999999973 < z Initial program 38.9%
remove-double-neg38.9%
associate-/l*49.6%
distribute-rgt-neg-in49.6%
distribute-lft-neg-in49.6%
distribute-lft-neg-in49.6%
distribute-rgt-neg-in49.6%
remove-double-neg49.6%
fma-define49.6%
fma-define49.6%
fma-define49.6%
Simplified49.6%
Taylor expanded in z around -inf 97.8%
mul-1-neg97.8%
unsub-neg97.8%
sub-neg97.8%
associate-*r/97.8%
metadata-eval97.8%
metadata-eval97.8%
Simplified97.8%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -16500000.0) (not (<= z 0.036))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y / 12.000000000000014);
}
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 <= (-16500000.0d0)) .or. (.not. (z <= 0.036d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y / 12.000000000000014d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -16500000.0) or not (z <= 0.036): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -16500000.0) || !(z <= 0.036)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y / 12.000000000000014)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -16500000.0) || ~((z <= 0.036))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -16500000.0], N[Not[LessEqual[z, 0.036]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16500000 \lor \neg \left(z \leq 0.036\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -1.65e7 or 0.0359999999999999973 < z Initial program 39.6%
remove-double-neg39.6%
associate-/l*52.9%
distribute-rgt-neg-in52.9%
distribute-lft-neg-in52.9%
distribute-lft-neg-in52.9%
distribute-rgt-neg-in52.9%
remove-double-neg52.9%
fma-define52.9%
fma-define52.9%
fma-define52.9%
Simplified52.9%
Taylor expanded in z around inf 98.3%
associate-*r/98.3%
metadata-eval98.3%
Simplified98.3%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
fma-undefine99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
associate-*r/99.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.2%
un-div-inv99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 99.2%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -16500000.0) (not (<= z 0.036))) (+ 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 <= -16500000.0) || !(z <= 0.036)) {
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 <= (-16500000.0d0)) .or. (.not. (z <= 0.036d0))) 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 <= -16500000.0) || !(z <= 0.036)) {
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 <= -16500000.0) or not (z <= 0.036): 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 <= -16500000.0) || !(z <= 0.036)) 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 <= -16500000.0) || ~((z <= 0.036))) 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, -16500000.0], N[Not[LessEqual[z, 0.036]], $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 -16500000 \lor \neg \left(z \leq 0.036\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 < -1.65e7 or 0.0359999999999999973 < z Initial program 39.6%
remove-double-neg39.6%
associate-/l*52.9%
distribute-rgt-neg-in52.9%
distribute-lft-neg-in52.9%
distribute-lft-neg-in52.9%
distribute-rgt-neg-in52.9%
remove-double-neg52.9%
fma-define52.9%
fma-define52.9%
fma-define52.9%
Simplified52.9%
Taylor expanded in z around inf 98.3%
associate-*r/98.3%
metadata-eval98.3%
Simplified98.3%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
remove-double-neg99.6%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.7%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -16500000.0) (not (<= z 0.036))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (/ y (+ 12.000000000000014 (* z 0.39999999996247915))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
}
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 <= (-16500000.0d0)) .or. (.not. (z <= 0.036d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y / (12.000000000000014d0 + (z * 0.39999999996247915d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -16500000.0) or not (z <= 0.036): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -16500000.0) || !(z <= 0.036)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * 0.39999999996247915)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -16500000.0) || ~((z <= 0.036))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -16500000.0], N[Not[LessEqual[z, 0.036]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(12.000000000000014 + N[(z * 0.39999999996247915), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16500000 \lor \neg \left(z \leq 0.036\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot 0.39999999996247915}\\
\end{array}
\end{array}
if z < -1.65e7 or 0.0359999999999999973 < z Initial program 39.6%
remove-double-neg39.6%
associate-/l*52.9%
distribute-rgt-neg-in52.9%
distribute-lft-neg-in52.9%
distribute-lft-neg-in52.9%
distribute-rgt-neg-in52.9%
remove-double-neg52.9%
fma-define52.9%
fma-define52.9%
fma-define52.9%
Simplified52.9%
Taylor expanded in z around inf 98.3%
associate-*r/98.3%
metadata-eval98.3%
Simplified98.3%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
fma-undefine99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
associate-*r/99.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.2%
un-div-inv99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -16500000.0) (not (<= z 0.036))) (+ x (/ y (- 14.431876219268936 (/ 15.646356830292042 z)))) (+ x (/ y (+ 12.000000000000014 (* z 0.39999999996247915))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
}
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 <= (-16500000.0d0)) .or. (.not. (z <= 0.036d0))) then
tmp = x + (y / (14.431876219268936d0 - (15.646356830292042d0 / z)))
else
tmp = x + (y / (12.000000000000014d0 + (z * 0.39999999996247915d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z)));
} else {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -16500000.0) or not (z <= 0.036): tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))) else: tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -16500000.0) || !(z <= 0.036)) tmp = Float64(x + Float64(y / Float64(14.431876219268936 - Float64(15.646356830292042 / z)))); else tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * 0.39999999996247915)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -16500000.0) || ~((z <= 0.036))) tmp = x + (y / (14.431876219268936 - (15.646356830292042 / z))); else tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -16500000.0], N[Not[LessEqual[z, 0.036]], $MachinePrecision]], N[(x + N[(y / N[(14.431876219268936 - N[(15.646356830292042 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(12.000000000000014 + N[(z * 0.39999999996247915), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16500000 \lor \neg \left(z \leq 0.036\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936 - \frac{15.646356830292042}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot 0.39999999996247915}\\
\end{array}
\end{array}
if z < -1.65e7 or 0.0359999999999999973 < z Initial program 39.6%
+-commutative39.6%
*-commutative39.6%
associate-/l*52.1%
fma-define52.1%
*-commutative52.1%
fma-define52.1%
fma-define52.1%
*-commutative52.1%
fma-define52.1%
Simplified52.1%
fma-undefine52.1%
fma-undefine52.1%
*-commutative52.1%
fma-define52.1%
fma-undefine52.1%
*-commutative52.1%
associate-*r/39.6%
associate-*l/52.9%
*-commutative52.9%
clear-num52.9%
un-div-inv52.9%
*-commutative52.9%
fma-undefine52.9%
fma-define52.9%
*-commutative52.9%
fma-undefine52.9%
Applied egg-rr52.9%
Taylor expanded in z around inf 98.7%
associate-*r/98.7%
metadata-eval98.7%
Simplified98.7%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
fma-undefine99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
associate-*r/99.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.2%
un-div-inv99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -16500000.0) (not (<= z 0.036))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
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 <= (-16500000.0d0)) .or. (.not. (z <= 0.036d0))) 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 <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -16500000.0) or not (z <= 0.036): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -16500000.0) || !(z <= 0.036)) 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 <= -16500000.0) || ~((z <= 0.036))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -16500000.0], N[Not[LessEqual[z, 0.036]], $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 -16500000 \lor \neg \left(z \leq 0.036\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -1.65e7 or 0.0359999999999999973 < z Initial program 39.6%
+-commutative39.6%
*-commutative39.6%
associate-/l*52.1%
fma-define52.1%
*-commutative52.1%
fma-define52.1%
fma-define52.1%
*-commutative52.1%
fma-define52.1%
Simplified52.1%
Taylor expanded in z around inf 97.7%
+-commutative97.7%
Simplified97.7%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around 0 99.1%
+-commutative99.1%
Simplified99.1%
Final simplification98.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -16500000.0) (not (<= z 0.036))) (+ x (* y 0.0692910599291889)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y / 12.000000000000014);
}
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 <= (-16500000.0d0)) .or. (.not. (z <= 0.036d0))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = x + (y / 12.000000000000014d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -16500000.0) or not (z <= 0.036): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -16500000.0) || !(z <= 0.036)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(y / 12.000000000000014)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -16500000.0) || ~((z <= 0.036))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -16500000.0], N[Not[LessEqual[z, 0.036]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16500000 \lor \neg \left(z \leq 0.036\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -1.65e7 or 0.0359999999999999973 < z Initial program 39.6%
+-commutative39.6%
*-commutative39.6%
associate-/l*52.1%
fma-define52.1%
*-commutative52.1%
fma-define52.1%
fma-define52.1%
*-commutative52.1%
fma-define52.1%
Simplified52.1%
Taylor expanded in z around inf 97.7%
+-commutative97.7%
Simplified97.7%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
fma-undefine99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
associate-*r/99.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.2%
un-div-inv99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 99.2%
Final simplification98.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -16500000.0) (not (<= z 0.036))) (+ x (/ y 14.431876219268936)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / 12.000000000000014);
}
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 <= (-16500000.0d0)) .or. (.not. (z <= 0.036d0))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = x + (y / 12.000000000000014d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -16500000.0) || !(z <= 0.036)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -16500000.0) or not (z <= 0.036): tmp = x + (y / 14.431876219268936) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -16500000.0) || !(z <= 0.036)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(x + Float64(y / 12.000000000000014)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -16500000.0) || ~((z <= 0.036))) tmp = x + (y / 14.431876219268936); else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -16500000.0], N[Not[LessEqual[z, 0.036]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -16500000 \lor \neg \left(z \leq 0.036\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -1.65e7 or 0.0359999999999999973 < z Initial program 39.6%
+-commutative39.6%
*-commutative39.6%
associate-/l*52.1%
fma-define52.1%
*-commutative52.1%
fma-define52.1%
fma-define52.1%
*-commutative52.1%
fma-define52.1%
Simplified52.1%
fma-undefine52.1%
fma-undefine52.1%
*-commutative52.1%
fma-define52.1%
fma-undefine52.1%
*-commutative52.1%
associate-*r/39.6%
associate-*l/52.9%
*-commutative52.9%
clear-num52.9%
un-div-inv52.9%
*-commutative52.9%
fma-undefine52.9%
fma-define52.9%
*-commutative52.9%
fma-undefine52.9%
Applied egg-rr52.9%
Taylor expanded in z around inf 98.0%
if -1.65e7 < z < 0.0359999999999999973Initial program 99.6%
+-commutative99.6%
*-commutative99.6%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
fma-undefine99.7%
fma-undefine99.7%
*-commutative99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
associate-*r/99.6%
associate-*l/99.9%
*-commutative99.9%
clear-num99.2%
un-div-inv99.4%
*-commutative99.4%
fma-undefine99.4%
fma-define99.4%
*-commutative99.4%
fma-undefine99.4%
Applied egg-rr99.4%
Taylor expanded in z around 0 99.2%
Final simplification98.6%
(FPCore (x y z) :precision binary64 (+ x (* y 0.0692910599291889)))
double code(double x, double y, double z) {
return x + (y * 0.0692910599291889);
}
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 * 0.0692910599291889d0)
end function
public static double code(double x, double y, double z) {
return x + (y * 0.0692910599291889);
}
def code(x, y, z): return x + (y * 0.0692910599291889)
function code(x, y, z) return Float64(x + Float64(y * 0.0692910599291889)) end
function tmp = code(x, y, z) tmp = x + (y * 0.0692910599291889); end
code[x_, y_, z_] := N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot 0.0692910599291889
\end{array}
Initial program 70.1%
+-commutative70.1%
*-commutative70.1%
associate-/l*76.3%
fma-define76.3%
*-commutative76.3%
fma-define76.3%
fma-define76.3%
*-commutative76.3%
fma-define76.3%
Simplified76.3%
Taylor expanded in z around inf 79.2%
+-commutative79.2%
Simplified79.2%
Final simplification79.2%
(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 70.1%
+-commutative70.1%
*-commutative70.1%
associate-/l*76.3%
fma-define76.3%
*-commutative76.3%
fma-define76.3%
fma-define76.3%
*-commutative76.3%
fma-define76.3%
Simplified76.3%
Taylor expanded in y around 0 51.3%
Final simplification51.3%
(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 2024084
(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))))