
(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
(+
0.279195317918525
(* z (+ 0.4917317610505968 (* z 0.0692910599291889)))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+304)
(fma
y
(/
(fma z (fma z 0.0692910599291889 0.4917317610505968) 0.279195317918525)
(fma z (+ z 6.012459259764103) 3.350343815022304))
x)
(+ x (/ y 14.431876219268936))))
double code(double x, double y, double z) {
double tmp;
if (((y * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 5e+304) {
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 / 14.431876219268936);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(0.279195317918525 + Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889))))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 5e+304) 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(y / 14.431876219268936)); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(y * N[(0.279195317918525 + N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 5e+304], 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[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 5 \cdot 10^{+304}:\\
\;\;\;\;\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}{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))) < 4.9999999999999997e304Initial program 96.3%
+-commutative96.3%
associate-/l*99.7%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
Simplified99.8%
if 4.9999999999999997e304 < (/.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.8%
remove-double-neg0.8%
distribute-lft-neg-out0.8%
distribute-neg-frac0.8%
associate-/l*15.2%
distribute-rgt-neg-in15.2%
distribute-lft-neg-in15.2%
distribute-rgt-neg-in15.2%
remove-double-neg15.2%
Simplified15.2%
fma-define15.2%
clear-num15.2%
un-div-inv15.3%
*-commutative15.3%
fma-undefine15.3%
fma-define15.3%
*-commutative15.3%
fma-undefine15.3%
Applied egg-rr15.3%
Taylor expanded in z around inf 99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
0.279195317918525
(* z (+ 0.4917317610505968 (* z 0.0692910599291889)))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+304)
(+
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 * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 5e+304) {
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(0.279195317918525 + Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889))))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 5e+304) 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[(0.279195317918525 + N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 5e+304], 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(0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 5 \cdot 10^{+304}:\\
\;\;\;\;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))) < 4.9999999999999997e304Initial program 96.3%
remove-double-neg96.3%
distribute-lft-neg-out96.3%
distribute-neg-frac96.3%
associate-/l*99.7%
distribute-rgt-neg-in99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
remove-double-neg99.7%
Simplified99.8%
if 4.9999999999999997e304 < (/.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.8%
remove-double-neg0.8%
distribute-lft-neg-out0.8%
distribute-neg-frac0.8%
associate-/l*15.2%
distribute-rgt-neg-in15.2%
distribute-lft-neg-in15.2%
distribute-rgt-neg-in15.2%
remove-double-neg15.2%
Simplified15.2%
fma-define15.2%
clear-num15.2%
un-div-inv15.3%
*-commutative15.3%
fma-undefine15.3%
fma-define15.3%
*-commutative15.3%
fma-undefine15.3%
Applied egg-rr15.3%
Taylor expanded in z around inf 99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
0.279195317918525
(* z (+ 0.4917317610505968 (* z 0.0692910599291889))))))
(if (<=
(/ (* y t_0) (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
5e+304)
(+ x (/ y (/ (fma z (+ z 6.012459259764103) 3.350343815022304) t_0)))
(+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
double t_0 = 0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889)));
double tmp;
if (((y * t_0) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 5e+304) {
tmp = x + (y / (fma(z, (z + 6.012459259764103), 3.350343815022304) / t_0));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
function code(x, y, z) t_0 = Float64(0.279195317918525 + Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889)))) tmp = 0.0 if (Float64(Float64(y * t_0) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 5e+304) tmp = Float64(x + Float64(y / Float64(fma(z, Float64(z + 6.012459259764103), 3.350343815022304) / t_0))); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.279195317918525 + N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * t$95$0), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 5e+304], N[(x + N[(y / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\\
\mathbf{if}\;\frac{y \cdot t\_0}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 5 \cdot 10^{+304}:\\
\;\;\;\;x + \frac{y}{\frac{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}{t\_0}}\\
\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))) < 4.9999999999999997e304Initial program 96.3%
remove-double-neg96.3%
distribute-lft-neg-out96.3%
distribute-neg-frac96.3%
associate-/l*99.7%
distribute-rgt-neg-in99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
remove-double-neg99.7%
Simplified99.8%
fma-define99.8%
clear-num99.3%
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.4%
if 4.9999999999999997e304 < (/.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.8%
remove-double-neg0.8%
distribute-lft-neg-out0.8%
distribute-neg-frac0.8%
associate-/l*15.2%
distribute-rgt-neg-in15.2%
distribute-lft-neg-in15.2%
distribute-rgt-neg-in15.2%
remove-double-neg15.2%
Simplified15.2%
fma-define15.2%
clear-num15.2%
un-div-inv15.3%
*-commutative15.3%
fma-undefine15.3%
fma-define15.3%
*-commutative15.3%
fma-undefine15.3%
Applied egg-rr15.3%
Taylor expanded in z around inf 99.9%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -2.9e+16) (not (<= z 5e+21)))
(+ x (/ y 14.431876219268936))
(+
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 <= -2.9e+16) || !(z <= 5e+21)) {
tmp = x + (y / 14.431876219268936);
} 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 <= (-2.9d+16)) .or. (.not. (z <= 5d+21))) then
tmp = x + (y / 14.431876219268936d0)
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 <= -2.9e+16) || !(z <= 5e+21)) {
tmp = x + (y / 14.431876219268936);
} 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 <= -2.9e+16) or not (z <= 5e+21): tmp = x + (y / 14.431876219268936) 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 <= -2.9e+16) || !(z <= 5e+21)) tmp = Float64(x + Float64(y / 14.431876219268936)); 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 <= -2.9e+16) || ~((z <= 5e+21))) tmp = x + (y / 14.431876219268936); 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, -2.9e+16], N[Not[LessEqual[z, 5e+21]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $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 -2.9 \cdot 10^{+16} \lor \neg \left(z \leq 5 \cdot 10^{+21}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\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.9e16 or 5e21 < z Initial program 35.4%
remove-double-neg35.4%
distribute-lft-neg-out35.4%
distribute-neg-frac35.4%
associate-/l*49.7%
distribute-rgt-neg-in49.7%
distribute-lft-neg-in49.7%
distribute-rgt-neg-in49.7%
remove-double-neg49.7%
Simplified49.7%
fma-define49.7%
clear-num49.7%
un-div-inv49.8%
*-commutative49.8%
fma-undefine49.8%
fma-define49.8%
*-commutative49.8%
fma-undefine49.8%
Applied egg-rr49.8%
Taylor expanded in z around inf 99.9%
if -2.9e16 < z < 5e21Initial program 99.7%
Taylor expanded in z around 0 99.7%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (or (<= z -1.1e+15) (not (<= z 5e+21)))
(+ x (/ y 14.431876219268936))
(+
(/
(*
y
(+
0.279195317918525
(* z (+ 0.4917317610505968 (* z 0.0692910599291889)))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.1e+15) || !(z <= 5e+21)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = ((y * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + 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 ((z <= (-1.1d+15)) .or. (.not. (z <= 5d+21))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = ((y * (0.279195317918525d0 + (z * (0.4917317610505968d0 + (z * 0.0692910599291889d0))))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.1e+15) || !(z <= 5e+21)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = ((y * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.1e+15) or not (z <= 5e+21): tmp = x + (y / 14.431876219268936) else: tmp = ((y * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.1e+15) || !(z <= 5e+21)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(Float64(Float64(y * Float64(0.279195317918525 + Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889))))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) + x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.1e+15) || ~((z <= 5e+21))) tmp = x + (y / 14.431876219268936); else tmp = ((y * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.1e+15], N[Not[LessEqual[z, 5e+21]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(0.279195317918525 + N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+15} \lor \neg \left(z \leq 5 \cdot 10^{+21}\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x\\
\end{array}
\end{array}
if z < -1.1e15 or 5e21 < z Initial program 36.0%
remove-double-neg36.0%
distribute-lft-neg-out36.0%
distribute-neg-frac36.0%
associate-/l*50.1%
distribute-rgt-neg-in50.1%
distribute-lft-neg-in50.1%
distribute-rgt-neg-in50.1%
remove-double-neg50.1%
Simplified50.1%
fma-define50.1%
clear-num50.1%
un-div-inv50.2%
*-commutative50.2%
fma-undefine50.2%
fma-define50.2%
*-commutative50.2%
fma-undefine50.2%
Applied egg-rr50.2%
Taylor expanded in z around inf 99.9%
if -1.1e15 < z < 5e21Initial program 99.7%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -3.4)
(+ x (/ y 14.431876219268936))
(if (<= z 3.2)
(+
x
(/
y
(+
12.000000000000014
(*
z
(+
0.39999999996247915
(* z (- (* z 0.07852944389170011) 0.10095235035524991)))))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 3.2) {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * ((z * 0.07852944389170011) - 0.10095235035524991))))));
} 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 <= (-3.4d0)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 3.2d0) then
tmp = x + (y / (12.000000000000014d0 + (z * (0.39999999996247915d0 + (z * ((z * 0.07852944389170011d0) - 0.10095235035524991d0))))))
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 <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 3.2) {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * ((z * 0.07852944389170011) - 0.10095235035524991))))));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.4: tmp = x + (y / 14.431876219268936) elif z <= 3.2: tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * ((z * 0.07852944389170011) - 0.10095235035524991)))))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.4) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 3.2) tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * Float64(0.39999999996247915 + Float64(z * Float64(Float64(z * 0.07852944389170011) - 0.10095235035524991))))))); 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 <= -3.4) tmp = x + (y / 14.431876219268936); elseif (z <= 3.2) tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * ((z * 0.07852944389170011) - 0.10095235035524991)))))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.4], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2], N[(x + N[(y / N[(12.000000000000014 + N[(z * N[(0.39999999996247915 + N[(z * N[(N[(z * 0.07852944389170011), $MachinePrecision] - 0.10095235035524991), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -3.4:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 3.2:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot \left(0.39999999996247915 + z \cdot \left(z \cdot 0.07852944389170011 - 0.10095235035524991\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -3.39999999999999991Initial program 38.4%
remove-double-neg38.4%
distribute-lft-neg-out38.4%
distribute-neg-frac38.4%
associate-/l*52.8%
distribute-rgt-neg-in52.8%
distribute-lft-neg-in52.8%
distribute-rgt-neg-in52.8%
remove-double-neg52.8%
Simplified52.8%
fma-define52.8%
clear-num52.8%
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 99.7%
if -3.39999999999999991 < z < 3.2000000000000002Initial 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%
fma-define99.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.1%
if 3.2000000000000002 < z Initial program 41.3%
remove-double-neg41.3%
distribute-lft-neg-out41.3%
distribute-neg-frac41.3%
associate-/l*53.4%
distribute-rgt-neg-in53.4%
distribute-lft-neg-in53.4%
distribute-rgt-neg-in53.4%
remove-double-neg53.4%
Simplified53.4%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (<= z -3.4)
(+ x (/ y 14.431876219268936))
(if (<= z 3.0)
(+
x
(*
y
(+
0.08333333333333323
(*
z
(-
(* z (+ 0.0007936505811533442 (* z -0.0005951669793454025)))
0.00277777777751721)))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.4) {
tmp = x + (y / 14.431876219268936);
} 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 + (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 <= (-3.4d0)) then
tmp = x + (y / 14.431876219268936d0)
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 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -3.4) {
tmp = x + (y / 14.431876219268936);
} 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 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.4: tmp = x + (y / 14.431876219268936) elif z <= 3.0: tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.4) tmp = Float64(x + Float64(y / 14.431876219268936)); 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(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.4) tmp = x + (y / 14.431876219268936); elseif (z <= 3.0) tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.4], N[(x + N[(y / 14.431876219268936), $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[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\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 + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -3.39999999999999991Initial program 38.4%
remove-double-neg38.4%
distribute-lft-neg-out38.4%
distribute-neg-frac38.4%
associate-/l*52.8%
distribute-rgt-neg-in52.8%
distribute-lft-neg-in52.8%
distribute-rgt-neg-in52.8%
remove-double-neg52.8%
Simplified52.8%
fma-define52.8%
clear-num52.8%
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 99.7%
if -3.39999999999999991 < 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.0%
if 3 < z Initial program 41.3%
remove-double-neg41.3%
distribute-lft-neg-out41.3%
distribute-neg-frac41.3%
associate-/l*53.4%
distribute-rgt-neg-in53.4%
distribute-lft-neg-in53.4%
distribute-rgt-neg-in53.4%
remove-double-neg53.4%
Simplified53.4%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (<= z -3.4)
(+ x (/ y 14.431876219268936))
(if (<= z 4.5)
(+
x
(/
y
(+
12.000000000000014
(* z (+ 0.39999999996247915 (* z -0.10095235035524991))))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 4.5) {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991)))));
} 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 <= (-3.4d0)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 4.5d0) then
tmp = x + (y / (12.000000000000014d0 + (z * (0.39999999996247915d0 + (z * (-0.10095235035524991d0))))))
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 <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 4.5) {
tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991)))));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.4: tmp = x + (y / 14.431876219268936) elif z <= 4.5: tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991))))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.4) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 4.5) 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(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.4) tmp = x + (y / 14.431876219268936); elseif (z <= 4.5) tmp = x + (y / (12.000000000000014 + (z * (0.39999999996247915 + (z * -0.10095235035524991))))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.4], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5], 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[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 4.5:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot \left(0.39999999996247915 + z \cdot -0.10095235035524991\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -3.39999999999999991Initial program 38.4%
remove-double-neg38.4%
distribute-lft-neg-out38.4%
distribute-neg-frac38.4%
associate-/l*52.8%
distribute-rgt-neg-in52.8%
distribute-lft-neg-in52.8%
distribute-rgt-neg-in52.8%
remove-double-neg52.8%
Simplified52.8%
fma-define52.8%
clear-num52.8%
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 99.7%
if -3.39999999999999991 < z < 4.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%
fma-define99.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 98.9%
*-commutative98.9%
Simplified98.9%
if 4.5 < z Initial program 41.3%
remove-double-neg41.3%
distribute-lft-neg-out41.3%
distribute-neg-frac41.3%
associate-/l*53.4%
distribute-rgt-neg-in53.4%
distribute-lft-neg-in53.4%
distribute-rgt-neg-in53.4%
remove-double-neg53.4%
Simplified53.4%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
(FPCore (x y z)
:precision binary64
(if (<= z -3.4)
(+ x (/ y 14.431876219268936))
(if (<= z 4.4)
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 4.4) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 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 <= (-3.4d0)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 4.4d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 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 <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 4.4) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.4: tmp = x + (y / 14.431876219268936) elif z <= 4.4: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.4) tmp = Float64(x + Float64(y / 14.431876219268936)); 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(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -3.4) tmp = x + (y / 14.431876219268936); elseif (z <= 4.4) tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.4], N[(x + N[(y / 14.431876219268936), $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[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\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 + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -3.39999999999999991Initial program 38.4%
remove-double-neg38.4%
distribute-lft-neg-out38.4%
distribute-neg-frac38.4%
associate-/l*52.8%
distribute-rgt-neg-in52.8%
distribute-lft-neg-in52.8%
distribute-rgt-neg-in52.8%
remove-double-neg52.8%
Simplified52.8%
fma-define52.8%
clear-num52.8%
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 99.7%
if -3.39999999999999991 < 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 98.9%
if 4.4000000000000004 < z Initial program 41.3%
remove-double-neg41.3%
distribute-lft-neg-out41.3%
distribute-neg-frac41.3%
associate-/l*53.4%
distribute-rgt-neg-in53.4%
distribute-lft-neg-in53.4%
distribute-rgt-neg-in53.4%
remove-double-neg53.4%
Simplified53.4%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= z -3.4)
(+ x (/ y 14.431876219268936))
(if (<= z 5.8)
(+ x (/ y (+ 12.000000000000014 (* z 0.39999999996247915))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 5.8) {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
} 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 <= (-3.4d0)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 5.8d0) then
tmp = x + (y / (12.000000000000014d0 + (z * 0.39999999996247915d0)))
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 <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 5.8) {
tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915)));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.4: tmp = x + (y / 14.431876219268936) elif z <= 5.8: tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.4) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 5.8) tmp = Float64(x + Float64(y / Float64(12.000000000000014 + Float64(z * 0.39999999996247915)))); 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 <= -3.4) tmp = x + (y / 14.431876219268936); elseif (z <= 5.8) tmp = x + (y / (12.000000000000014 + (z * 0.39999999996247915))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.4], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8], N[(x + N[(y / N[(12.000000000000014 + N[(z * 0.39999999996247915), $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 -3.4:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 5.8:\\
\;\;\;\;x + \frac{y}{12.000000000000014 + z \cdot 0.39999999996247915}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -3.39999999999999991Initial program 38.4%
remove-double-neg38.4%
distribute-lft-neg-out38.4%
distribute-neg-frac38.4%
associate-/l*52.8%
distribute-rgt-neg-in52.8%
distribute-lft-neg-in52.8%
distribute-rgt-neg-in52.8%
remove-double-neg52.8%
Simplified52.8%
fma-define52.8%
clear-num52.8%
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 99.7%
if -3.39999999999999991 < z < 5.79999999999999982Initial 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%
fma-define99.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 98.7%
*-commutative98.7%
Simplified98.7%
if 5.79999999999999982 < z Initial program 41.3%
remove-double-neg41.3%
distribute-lft-neg-out41.3%
distribute-neg-frac41.3%
associate-/l*53.4%
distribute-rgt-neg-in53.4%
distribute-lft-neg-in53.4%
distribute-rgt-neg-in53.4%
remove-double-neg53.4%
Simplified53.4%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
(FPCore (x y z)
:precision binary64
(if (<= z -3.4)
(+ x (/ y 14.431876219268936))
(if (<= z 4.5)
(+ 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 <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 4.5) {
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 <= (-3.4d0)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 4.5d0) 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 <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 4.5) {
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 <= -3.4: tmp = x + (y / 14.431876219268936) elif z <= 4.5: 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 <= -3.4) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 4.5) 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 <= -3.4) tmp = x + (y / 14.431876219268936); elseif (z <= 4.5) 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, -3.4], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5], 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 -3.4:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 4.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 < -3.39999999999999991Initial program 38.4%
remove-double-neg38.4%
distribute-lft-neg-out38.4%
distribute-neg-frac38.4%
associate-/l*52.8%
distribute-rgt-neg-in52.8%
distribute-lft-neg-in52.8%
distribute-rgt-neg-in52.8%
remove-double-neg52.8%
Simplified52.8%
fma-define52.8%
clear-num52.8%
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 99.7%
if -3.39999999999999991 < z < 4.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 98.7%
if 4.5 < z Initial program 41.3%
remove-double-neg41.3%
distribute-lft-neg-out41.3%
distribute-neg-frac41.3%
associate-/l*53.4%
distribute-rgt-neg-in53.4%
distribute-lft-neg-in53.4%
distribute-rgt-neg-in53.4%
remove-double-neg53.4%
Simplified53.4%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (<= z -3.4)
(+ x (/ y 14.431876219268936))
(if (<= z 5.5)
(+ x (/ y 12.000000000000014))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 5.5) {
tmp = x + (y / 12.000000000000014);
} 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 <= (-3.4d0)) then
tmp = x + (y / 14.431876219268936d0)
else if (z <= 5.5d0) then
tmp = x + (y / 12.000000000000014d0)
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 <= -3.4) {
tmp = x + (y / 14.431876219268936);
} else if (z <= 5.5) {
tmp = x + (y / 12.000000000000014);
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -3.4: tmp = x + (y / 14.431876219268936) elif z <= 5.5: tmp = x + (y / 12.000000000000014) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -3.4) tmp = Float64(x + Float64(y / 14.431876219268936)); elseif (z <= 5.5) tmp = Float64(x + Float64(y / 12.000000000000014)); 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 <= -3.4) tmp = x + (y / 14.431876219268936); elseif (z <= 5.5) tmp = x + (y / 12.000000000000014); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -3.4], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5], N[(x + N[(y / 12.000000000000014), $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 -3.4:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{elif}\;z \leq 5.5:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -3.39999999999999991Initial program 38.4%
remove-double-neg38.4%
distribute-lft-neg-out38.4%
distribute-neg-frac38.4%
associate-/l*52.8%
distribute-rgt-neg-in52.8%
distribute-lft-neg-in52.8%
distribute-rgt-neg-in52.8%
remove-double-neg52.8%
Simplified52.8%
fma-define52.8%
clear-num52.8%
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 99.7%
if -3.39999999999999991 < z < 5.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%
fma-define99.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 98.4%
if 5.5 < z Initial program 41.3%
remove-double-neg41.3%
distribute-lft-neg-out41.3%
distribute-neg-frac41.3%
associate-/l*53.4%
distribute-rgt-neg-in53.4%
distribute-lft-neg-in53.4%
distribute-rgt-neg-in53.4%
remove-double-neg53.4%
Simplified53.4%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
(FPCore (x y z) :precision binary64 (if (or (<= z -3.4) (not (<= z 6.5))) (+ x (/ y 14.431876219268936)) (+ x (/ y 12.000000000000014))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.4) || !(z <= 6.5)) {
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 <= (-3.4d0)) .or. (.not. (z <= 6.5d0))) 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 <= -3.4) || !(z <= 6.5)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y / 12.000000000000014);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.4) or not (z <= 6.5): tmp = x + (y / 14.431876219268936) else: tmp = x + (y / 12.000000000000014) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.4) || !(z <= 6.5)) 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 <= -3.4) || ~((z <= 6.5))) tmp = x + (y / 14.431876219268936); else tmp = x + (y / 12.000000000000014); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.4], N[Not[LessEqual[z, 6.5]], $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 -3.4 \lor \neg \left(z \leq 6.5\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{12.000000000000014}\\
\end{array}
\end{array}
if z < -3.39999999999999991 or 6.5 < z Initial program 39.8%
remove-double-neg39.8%
distribute-lft-neg-out39.8%
distribute-neg-frac39.8%
associate-/l*53.1%
distribute-rgt-neg-in53.1%
distribute-lft-neg-in53.1%
distribute-rgt-neg-in53.1%
remove-double-neg53.1%
Simplified53.1%
fma-define53.1%
clear-num53.1%
un-div-inv53.1%
*-commutative53.1%
fma-undefine53.1%
fma-define53.1%
*-commutative53.1%
fma-undefine53.1%
Applied egg-rr53.1%
Taylor expanded in z around inf 99.4%
if -3.39999999999999991 < z < 6.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%
fma-define99.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 98.4%
Final simplification98.9%
(FPCore (x y z) :precision binary64 (if (<= x -1.35e-87) x (if (<= x 420000.0) (/ y (- -12.000000000000014)) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.35e-87) {
tmp = x;
} else if (x <= 420000.0) {
tmp = y / -(-12.000000000000014);
} 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.35d-87)) then
tmp = x
else if (x <= 420000.0d0) then
tmp = y / -(-12.000000000000014d0)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.35e-87) {
tmp = x;
} else if (x <= 420000.0) {
tmp = y / -(-12.000000000000014);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.35e-87: tmp = x elif x <= 420000.0: tmp = y / -(-12.000000000000014) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.35e-87) tmp = x; elseif (x <= 420000.0) tmp = Float64(y / Float64(-(-12.000000000000014))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.35e-87) tmp = x; elseif (x <= 420000.0) tmp = y / -(-12.000000000000014); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.35e-87], x, If[LessEqual[x, 420000.0], N[(y / (--12.000000000000014)), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{-87}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 420000:\\
\;\;\;\;\frac{y}{--12.000000000000014}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.34999999999999992e-87 or 4.2e5 < x Initial program 72.6%
+-commutative72.6%
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 y around 0 74.4%
if -1.34999999999999992e-87 < x < 4.2e5Initial program 71.2%
+-commutative71.2%
associate-/l*78.0%
fma-define78.0%
*-commutative78.0%
fma-define78.0%
fma-define78.0%
*-commutative78.0%
fma-define78.0%
Simplified78.0%
Taylor expanded in z around 0 69.9%
+-commutative69.9%
fma-define69.9%
Simplified69.9%
Taylor expanded in y around inf 53.5%
*-commutative53.5%
metadata-eval53.5%
div-inv53.5%
frac-2neg53.5%
metadata-eval53.5%
Applied egg-rr53.5%
Final simplification66.5%
(FPCore (x y z) :precision binary64 (if (<= x -1.4e-86) x (if (<= x 420000.0) (* y 0.08333333333333323) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.4e-86) {
tmp = x;
} else if (x <= 420000.0) {
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.4d-86)) then
tmp = x
else if (x <= 420000.0d0) 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.4e-86) {
tmp = x;
} else if (x <= 420000.0) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.4e-86: tmp = x elif x <= 420000.0: tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.4e-86) tmp = x; elseif (x <= 420000.0) 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.4e-86) tmp = x; elseif (x <= 420000.0) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.4e-86], x, If[LessEqual[x, 420000.0], N[(y * 0.08333333333333323), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{-86}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 420000:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.40000000000000005e-86 or 4.2e5 < x Initial program 72.6%
+-commutative72.6%
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 y around 0 74.4%
if -1.40000000000000005e-86 < x < 4.2e5Initial program 71.2%
+-commutative71.2%
associate-/l*78.0%
fma-define78.0%
*-commutative78.0%
fma-define78.0%
fma-define78.0%
*-commutative78.0%
fma-define78.0%
Simplified78.0%
Taylor expanded in z around 0 69.9%
+-commutative69.9%
fma-define69.9%
Simplified69.9%
Taylor expanded in y around inf 53.5%
Final simplification66.4%
(FPCore (x y z) :precision binary64 (+ x (/ y 12.000000000000014)))
double code(double x, double y, double z) {
return x + (y / 12.000000000000014);
}
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 / 12.000000000000014d0)
end function
public static double code(double x, double y, double z) {
return x + (y / 12.000000000000014);
}
def code(x, y, z): return x + (y / 12.000000000000014)
function code(x, y, z) return Float64(x + Float64(y / 12.000000000000014)) end
function tmp = code(x, y, z) tmp = x + (y / 12.000000000000014); end
code[x_, y_, z_] := N[(x + N[(y / 12.000000000000014), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{12.000000000000014}
\end{array}
Initial program 72.1%
remove-double-neg72.1%
distribute-lft-neg-out72.1%
distribute-neg-frac72.1%
associate-/l*78.3%
distribute-rgt-neg-in78.3%
distribute-lft-neg-in78.3%
distribute-rgt-neg-in78.3%
remove-double-neg78.3%
Simplified78.3%
fma-define78.3%
clear-num77.9%
un-div-inv78.1%
*-commutative78.1%
fma-undefine78.1%
fma-define78.1%
*-commutative78.1%
fma-undefine78.1%
Applied egg-rr78.1%
Taylor expanded in z around 0 81.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 72.1%
+-commutative72.1%
associate-/l*78.3%
fma-define78.3%
*-commutative78.3%
fma-define78.3%
fma-define78.3%
*-commutative78.3%
fma-define78.3%
Simplified78.3%
Taylor expanded in y around 0 53.8%
(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 2024103
(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))))