
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7e+21) (not (<= z 5e+34))) (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))) (+ (+ (* a (* z b)) (* t a)) (+ x (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7e+21) || !(z <= 5e+34)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = ((a * (z * b)) + (t * a)) + (x + (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-7d+21)) .or. (.not. (z <= 5d+34))) then
tmp = z * (y + ((x / z) + (a * (b + (t / z)))))
else
tmp = ((a * (z * b)) + (t * a)) + (x + (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7e+21) || !(z <= 5e+34)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = ((a * (z * b)) + (t * a)) + (x + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7e+21) or not (z <= 5e+34): tmp = z * (y + ((x / z) + (a * (b + (t / z))))) else: tmp = ((a * (z * b)) + (t * a)) + (x + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7e+21) || !(z <= 5e+34)) tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); else tmp = Float64(Float64(Float64(a * Float64(z * b)) + Float64(t * a)) + Float64(x + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7e+21) || ~((z <= 5e+34))) tmp = z * (y + ((x / z) + (a * (b + (t / z))))); else tmp = ((a * (z * b)) + (t * a)) + (x + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7e+21], N[Not[LessEqual[z, 5e+34]], $MachinePrecision]], N[(z * N[(y + N[(N[(x / z), $MachinePrecision] + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+21} \lor \neg \left(z \leq 5 \cdot 10^{+34}\right):\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(z \cdot b\right) + t \cdot a\right) + \left(x + y \cdot z\right)\\
\end{array}
\end{array}
if z < -7e21 or 4.9999999999999998e34 < z Initial program 76.2%
associate-+l+76.2%
associate-*l*79.4%
Simplified79.4%
Taylor expanded in z around inf 95.7%
+-commutative95.7%
associate-+l+95.7%
+-commutative95.7%
associate-/l*99.0%
distribute-lft-out99.9%
Simplified99.9%
if -7e21 < z < 4.9999999999999998e34Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (* t a) (+ x (* y z))) (* (* z a) b)))) (if (<= t_1 2e+304) t_1 (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b);
double tmp;
if (t_1 <= 2e+304) {
tmp = t_1;
} else {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b)
if (t_1 <= 2d+304) then
tmp = t_1
else
tmp = z * (y + ((x / z) + (a * (b + (t / z)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b);
double tmp;
if (t_1 <= 2e+304) {
tmp = t_1;
} else {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b) tmp = 0 if t_1 <= 2e+304: tmp = t_1 else: tmp = z * (y + ((x / z) + (a * (b + (t / z))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t * a) + Float64(x + Float64(y * z))) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= 2e+304) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t * a) + (x + (y * z))) + ((z * a) * b); tmp = 0.0; if (t_1 <= 2e+304) tmp = t_1; else tmp = z * (y + ((x / z) + (a * (b + (t / z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+304], t$95$1, N[(z * N[(y + N[(N[(x / z), $MachinePrecision] + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t \cdot a + \left(x + y \cdot z\right)\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 1.9999999999999999e304Initial program 98.6%
if 1.9999999999999999e304 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 48.4%
associate-+l+48.4%
associate-*l*66.0%
Simplified66.0%
Taylor expanded in z around inf 90.0%
+-commutative90.0%
associate-+l+90.0%
+-commutative90.0%
associate-/l*98.0%
distribute-lft-out100.0%
Simplified100.0%
Final simplification98.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -2.85e+63)
(* t a)
(if (<= a -0.01)
x
(if (<= a -9.8e-225)
(* y z)
(if (<= a 7.4e-56) x (if (<= a 260.0) (* a (* z b)) (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.85e+63) {
tmp = t * a;
} else if (a <= -0.01) {
tmp = x;
} else if (a <= -9.8e-225) {
tmp = y * z;
} else if (a <= 7.4e-56) {
tmp = x;
} else if (a <= 260.0) {
tmp = a * (z * b);
} else {
tmp = t * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-2.85d+63)) then
tmp = t * a
else if (a <= (-0.01d0)) then
tmp = x
else if (a <= (-9.8d-225)) then
tmp = y * z
else if (a <= 7.4d-56) then
tmp = x
else if (a <= 260.0d0) then
tmp = a * (z * b)
else
tmp = t * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.85e+63) {
tmp = t * a;
} else if (a <= -0.01) {
tmp = x;
} else if (a <= -9.8e-225) {
tmp = y * z;
} else if (a <= 7.4e-56) {
tmp = x;
} else if (a <= 260.0) {
tmp = a * (z * b);
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.85e+63: tmp = t * a elif a <= -0.01: tmp = x elif a <= -9.8e-225: tmp = y * z elif a <= 7.4e-56: tmp = x elif a <= 260.0: tmp = a * (z * b) else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.85e+63) tmp = Float64(t * a); elseif (a <= -0.01) tmp = x; elseif (a <= -9.8e-225) tmp = Float64(y * z); elseif (a <= 7.4e-56) tmp = x; elseif (a <= 260.0) tmp = Float64(a * Float64(z * b)); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -2.85e+63) tmp = t * a; elseif (a <= -0.01) tmp = x; elseif (a <= -9.8e-225) tmp = y * z; elseif (a <= 7.4e-56) tmp = x; elseif (a <= 260.0) tmp = a * (z * b); else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.85e+63], N[(t * a), $MachinePrecision], If[LessEqual[a, -0.01], x, If[LessEqual[a, -9.8e-225], N[(y * z), $MachinePrecision], If[LessEqual[a, 7.4e-56], x, If[LessEqual[a, 260.0], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], N[(t * a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.85 \cdot 10^{+63}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq -0.01:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -9.8 \cdot 10^{-225}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;a \leq 7.4 \cdot 10^{-56}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 260:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -2.8500000000000001e63 or 260 < a Initial program 78.0%
associate-+l+78.0%
associate-*l*88.4%
Simplified88.4%
Taylor expanded in z around 0 60.9%
Taylor expanded in x around 0 51.1%
if -2.8500000000000001e63 < a < -0.0100000000000000002 or -9.79999999999999942e-225 < a < 7.4000000000000004e-56Initial program 97.5%
associate-+l+97.5%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in z around 0 59.4%
Taylor expanded in x around inf 49.7%
if -0.0100000000000000002 < a < -9.79999999999999942e-225Initial program 98.0%
add-cube-cbrt97.7%
pow397.7%
*-commutative97.7%
Applied egg-rr97.7%
Taylor expanded in z around inf 63.7%
+-commutative63.7%
Simplified63.7%
Taylor expanded in a around 0 45.2%
*-commutative45.2%
Simplified45.2%
if 7.4000000000000004e-56 < a < 260Initial program 91.5%
add-cube-cbrt91.1%
pow391.1%
*-commutative91.1%
Applied egg-rr91.1%
Taylor expanded in z around inf 92.0%
+-commutative92.0%
Simplified92.0%
Taylor expanded in a around inf 50.9%
*-commutative50.9%
Simplified50.9%
Final simplification49.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -8.5e+63)
(* t a)
(if (<= a -14.5)
x
(if (<= a -1.02e-226)
(* y z)
(if (<= a 6.6e-104) x (if (<= a 1.5e-9) (* y z) (* t a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8.5e+63) {
tmp = t * a;
} else if (a <= -14.5) {
tmp = x;
} else if (a <= -1.02e-226) {
tmp = y * z;
} else if (a <= 6.6e-104) {
tmp = x;
} else if (a <= 1.5e-9) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-8.5d+63)) then
tmp = t * a
else if (a <= (-14.5d0)) then
tmp = x
else if (a <= (-1.02d-226)) then
tmp = y * z
else if (a <= 6.6d-104) then
tmp = x
else if (a <= 1.5d-9) then
tmp = y * z
else
tmp = t * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8.5e+63) {
tmp = t * a;
} else if (a <= -14.5) {
tmp = x;
} else if (a <= -1.02e-226) {
tmp = y * z;
} else if (a <= 6.6e-104) {
tmp = x;
} else if (a <= 1.5e-9) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -8.5e+63: tmp = t * a elif a <= -14.5: tmp = x elif a <= -1.02e-226: tmp = y * z elif a <= 6.6e-104: tmp = x elif a <= 1.5e-9: tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -8.5e+63) tmp = Float64(t * a); elseif (a <= -14.5) tmp = x; elseif (a <= -1.02e-226) tmp = Float64(y * z); elseif (a <= 6.6e-104) tmp = x; elseif (a <= 1.5e-9) tmp = Float64(y * z); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -8.5e+63) tmp = t * a; elseif (a <= -14.5) tmp = x; elseif (a <= -1.02e-226) tmp = y * z; elseif (a <= 6.6e-104) tmp = x; elseif (a <= 1.5e-9) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -8.5e+63], N[(t * a), $MachinePrecision], If[LessEqual[a, -14.5], x, If[LessEqual[a, -1.02e-226], N[(y * z), $MachinePrecision], If[LessEqual[a, 6.6e-104], x, If[LessEqual[a, 1.5e-9], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{+63}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq -14.5:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.02 \cdot 10^{-226}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{-104}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-9}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -8.5000000000000004e63 or 1.49999999999999999e-9 < a Initial program 78.2%
associate-+l+78.2%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in z around 0 60.3%
Taylor expanded in x around 0 50.6%
if -8.5000000000000004e63 < a < -14.5 or -1.01999999999999998e-226 < a < 6.60000000000000004e-104Initial program 98.6%
associate-+l+98.6%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in z around 0 60.6%
Taylor expanded in x around inf 52.4%
if -14.5 < a < -1.01999999999999998e-226 or 6.60000000000000004e-104 < a < 1.49999999999999999e-9Initial program 95.7%
add-cube-cbrt95.4%
pow395.4%
*-commutative95.4%
Applied egg-rr95.4%
Taylor expanded in z around inf 65.7%
+-commutative65.7%
Simplified65.7%
Taylor expanded in a around 0 44.2%
*-commutative44.2%
Simplified44.2%
Final simplification49.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6e-109) (not (<= z 1.15e-57))) (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e-109) || !(z <= 1.15e-57)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6d-109)) .or. (.not. (z <= 1.15d-57))) then
tmp = z * (y + ((x / z) + (a * (b + (t / z)))))
else
tmp = x + ((t * a) + (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e-109) || !(z <= 1.15e-57)) {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e-109) or not (z <= 1.15e-57): tmp = z * (y + ((x / z) + (a * (b + (t / z))))) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e-109) || !(z <= 1.15e-57)) tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); else tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6e-109) || ~((z <= 1.15e-57))) tmp = z * (y + ((x / z) + (a * (b + (t / z))))); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e-109], N[Not[LessEqual[z, 1.15e-57]], $MachinePrecision]], N[(z * N[(y + N[(N[(x / z), $MachinePrecision] + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{-109} \lor \neg \left(z \leq 1.15 \cdot 10^{-57}\right):\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if z < -6.00000000000000043e-109 or 1.15e-57 < z Initial program 81.4%
associate-+l+81.4%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in z around inf 95.5%
+-commutative95.5%
associate-+l+95.5%
+-commutative95.5%
associate-/l*98.1%
distribute-lft-out98.7%
Simplified98.7%
if -6.00000000000000043e-109 < z < 1.15e-57Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in b around 0 93.2%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))))
(if (<= z -2.9e+136)
t_1
(if (<= z -7e+42) (* z (* a b)) (if (<= z 1.25e+86) (+ x (* t a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (z <= -2.9e+136) {
tmp = t_1;
} else if (z <= -7e+42) {
tmp = z * (a * b);
} else if (z <= 1.25e+86) {
tmp = x + (t * a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * z)
if (z <= (-2.9d+136)) then
tmp = t_1
else if (z <= (-7d+42)) then
tmp = z * (a * b)
else if (z <= 1.25d+86) then
tmp = x + (t * a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (z <= -2.9e+136) {
tmp = t_1;
} else if (z <= -7e+42) {
tmp = z * (a * b);
} else if (z <= 1.25e+86) {
tmp = x + (t * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if z <= -2.9e+136: tmp = t_1 elif z <= -7e+42: tmp = z * (a * b) elif z <= 1.25e+86: tmp = x + (t * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if (z <= -2.9e+136) tmp = t_1; elseif (z <= -7e+42) tmp = Float64(z * Float64(a * b)); elseif (z <= 1.25e+86) tmp = Float64(x + Float64(t * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if (z <= -2.9e+136) tmp = t_1; elseif (z <= -7e+42) tmp = z * (a * b); elseif (z <= 1.25e+86) tmp = x + (t * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+136], t$95$1, If[LessEqual[z, -7e+42], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+86], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{+42}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+86}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.89999999999999974e136 or 1.2499999999999999e86 < z Initial program 71.5%
associate-+l+71.5%
associate-*l*78.2%
Simplified78.2%
Taylor expanded in b around 0 74.1%
Taylor expanded in a around 0 59.6%
*-commutative59.6%
Simplified59.6%
if -2.89999999999999974e136 < z < -7.00000000000000047e42Initial program 87.2%
add-cube-cbrt86.9%
pow386.9%
*-commutative86.9%
Applied egg-rr86.9%
Taylor expanded in z around inf 83.5%
+-commutative83.5%
Simplified83.5%
Taylor expanded in a around inf 51.5%
associate-*r*59.4%
*-commutative59.4%
Simplified59.4%
if -7.00000000000000047e42 < z < 1.2499999999999999e86Initial program 99.3%
associate-+l+99.3%
associate-*l*99.3%
Simplified99.3%
Taylor expanded in z around 0 76.3%
Final simplification69.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.9e+138)
(* y z)
(if (<= z -1.22e+36)
(* z (* a b))
(if (<= z 5e+140) (+ x (* t a)) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.9e+138) {
tmp = y * z;
} else if (z <= -1.22e+36) {
tmp = z * (a * b);
} else if (z <= 5e+140) {
tmp = x + (t * a);
} else {
tmp = y * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.9d+138)) then
tmp = y * z
else if (z <= (-1.22d+36)) then
tmp = z * (a * b)
else if (z <= 5d+140) then
tmp = x + (t * a)
else
tmp = y * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.9e+138) {
tmp = y * z;
} else if (z <= -1.22e+36) {
tmp = z * (a * b);
} else if (z <= 5e+140) {
tmp = x + (t * a);
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.9e+138: tmp = y * z elif z <= -1.22e+36: tmp = z * (a * b) elif z <= 5e+140: tmp = x + (t * a) else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.9e+138) tmp = Float64(y * z); elseif (z <= -1.22e+36) tmp = Float64(z * Float64(a * b)); elseif (z <= 5e+140) tmp = Float64(x + Float64(t * a)); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.9e+138) tmp = y * z; elseif (z <= -1.22e+36) tmp = z * (a * b); elseif (z <= 5e+140) tmp = x + (t * a); else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.9e+138], N[(y * z), $MachinePrecision], If[LessEqual[z, -1.22e+36], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+140], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(y * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+138}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -1.22 \cdot 10^{+36}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+140}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -2.9000000000000001e138 or 5.00000000000000008e140 < z Initial program 69.5%
add-cube-cbrt69.4%
pow369.4%
*-commutative69.4%
Applied egg-rr69.4%
Taylor expanded in z around inf 83.0%
+-commutative83.0%
Simplified83.0%
Taylor expanded in a around 0 58.0%
*-commutative58.0%
Simplified58.0%
if -2.9000000000000001e138 < z < -1.21999999999999995e36Initial program 87.2%
add-cube-cbrt86.9%
pow386.9%
*-commutative86.9%
Applied egg-rr86.9%
Taylor expanded in z around inf 83.5%
+-commutative83.5%
Simplified83.5%
Taylor expanded in a around inf 51.5%
associate-*r*59.4%
*-commutative59.4%
Simplified59.4%
if -1.21999999999999995e36 < z < 5.00000000000000008e140Initial program 98.1%
associate-+l+98.1%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in z around 0 73.7%
Final simplification67.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.5e+19) (not (<= z 1.5e-14))) (+ x (* z (+ y (* a b)))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e+19) || !(z <= 1.5e-14)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-6.5d+19)) .or. (.not. (z <= 1.5d-14))) then
tmp = x + (z * (y + (a * b)))
else
tmp = x + (a * (t + (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.5e+19) || !(z <= 1.5e-14)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.5e+19) or not (z <= 1.5e-14): tmp = x + (z * (y + (a * b))) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.5e+19) || !(z <= 1.5e-14)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.5e+19) || ~((z <= 1.5e-14))) tmp = x + (z * (y + (a * b))); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.5e+19], N[Not[LessEqual[z, 1.5e-14]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+19} \lor \neg \left(z \leq 1.5 \cdot 10^{-14}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -6.5e19 or 1.4999999999999999e-14 < z Initial program 77.8%
associate-+l+77.8%
associate-*l*80.9%
Simplified80.9%
Taylor expanded in t around 0 71.8%
+-commutative71.8%
associate-*r*77.7%
distribute-rgt-in85.4%
Simplified85.4%
if -6.5e19 < z < 1.4999999999999999e-14Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
associate-*l*100.0%
*-commutative100.0%
*-commutative100.0%
distribute-rgt-out100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 88.7%
Final simplification87.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.2e+29) (not (<= z 1.35e+140))) (* z (+ y (* a b))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.2e+29) || !(z <= 1.35e+140)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.2d+29)) .or. (.not. (z <= 1.35d+140))) then
tmp = z * (y + (a * b))
else
tmp = x + (a * (t + (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.2e+29) || !(z <= 1.35e+140)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.2e+29) or not (z <= 1.35e+140): tmp = z * (y + (a * b)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.2e+29) || !(z <= 1.35e+140)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.2e+29) || ~((z <= 1.35e+140))) tmp = z * (y + (a * b)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.2e+29], N[Not[LessEqual[z, 1.35e+140]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+29} \lor \neg \left(z \leq 1.35 \cdot 10^{+140}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -1.2e29 or 1.35000000000000009e140 < z Initial program 74.1%
associate-+l+74.1%
associate-*l*79.1%
Simplified79.1%
Taylor expanded in z around inf 83.3%
if -1.2e29 < z < 1.35000000000000009e140Initial program 98.1%
associate-+l+98.1%
+-commutative98.1%
fma-define98.1%
associate-*l*97.4%
*-commutative97.4%
*-commutative97.4%
distribute-rgt-out98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in y around 0 85.5%
Final simplification84.6%
(FPCore (x y z t a b) :precision binary64 (if (<= b -2.8e+107) (+ x (* a (+ t (* z b)))) (if (<= b 8.5e+17) (+ x (+ (* t a) (* y z))) (+ x (* z (+ y (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.8e+107) {
tmp = x + (a * (t + (z * b)));
} else if (b <= 8.5e+17) {
tmp = x + ((t * a) + (y * z));
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.8d+107)) then
tmp = x + (a * (t + (z * b)))
else if (b <= 8.5d+17) then
tmp = x + ((t * a) + (y * z))
else
tmp = x + (z * (y + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.8e+107) {
tmp = x + (a * (t + (z * b)));
} else if (b <= 8.5e+17) {
tmp = x + ((t * a) + (y * z));
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.8e+107: tmp = x + (a * (t + (z * b))) elif b <= 8.5e+17: tmp = x + ((t * a) + (y * z)) else: tmp = x + (z * (y + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.8e+107) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); elseif (b <= 8.5e+17) tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z))); else tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.8e+107) tmp = x + (a * (t + (z * b))); elseif (b <= 8.5e+17) tmp = x + ((t * a) + (y * z)); else tmp = x + (z * (y + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.8e+107], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e+17], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+107}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+17}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if b < -2.79999999999999985e107Initial program 87.4%
associate-+l+87.4%
+-commutative87.4%
fma-define87.4%
associate-*l*78.1%
*-commutative78.1%
*-commutative78.1%
distribute-rgt-out83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y around 0 80.7%
if -2.79999999999999985e107 < b < 8.5e17Initial program 88.7%
associate-+l+88.7%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in b around 0 93.1%
if 8.5e17 < b Initial program 89.8%
associate-+l+89.8%
associate-*l*86.9%
Simplified86.9%
Taylor expanded in t around 0 75.9%
+-commutative75.9%
associate-*r*82.5%
distribute-rgt-in88.3%
Simplified88.3%
Final simplification89.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.05e+140) (* y z) (if (<= z -1.65e-49) (* z (* a b)) (if (<= z 1.55e-13) x (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.05e+140) {
tmp = y * z;
} else if (z <= -1.65e-49) {
tmp = z * (a * b);
} else if (z <= 1.55e-13) {
tmp = x;
} else {
tmp = y * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.05d+140)) then
tmp = y * z
else if (z <= (-1.65d-49)) then
tmp = z * (a * b)
else if (z <= 1.55d-13) then
tmp = x
else
tmp = y * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.05e+140) {
tmp = y * z;
} else if (z <= -1.65e-49) {
tmp = z * (a * b);
} else if (z <= 1.55e-13) {
tmp = x;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.05e+140: tmp = y * z elif z <= -1.65e-49: tmp = z * (a * b) elif z <= 1.55e-13: tmp = x else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.05e+140) tmp = Float64(y * z); elseif (z <= -1.65e-49) tmp = Float64(z * Float64(a * b)); elseif (z <= 1.55e-13) tmp = x; else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.05e+140) tmp = y * z; elseif (z <= -1.65e-49) tmp = z * (a * b); elseif (z <= 1.55e-13) tmp = x; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.05e+140], N[(y * z), $MachinePrecision], If[LessEqual[z, -1.65e-49], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-13], x, N[(y * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+140}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-49}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -2.0499999999999999e140 or 1.55e-13 < z Initial program 75.2%
add-cube-cbrt75.0%
pow375.0%
*-commutative75.0%
Applied egg-rr75.0%
Taylor expanded in z around inf 76.5%
+-commutative76.5%
Simplified76.5%
Taylor expanded in a around 0 50.1%
*-commutative50.1%
Simplified50.1%
if -2.0499999999999999e140 < z < -1.65e-49Initial program 89.4%
add-cube-cbrt89.1%
pow389.2%
*-commutative89.2%
Applied egg-rr89.2%
Taylor expanded in z around inf 76.5%
+-commutative76.5%
Simplified76.5%
Taylor expanded in a around inf 46.7%
associate-*r*53.2%
*-commutative53.2%
Simplified53.2%
if -1.65e-49 < z < 1.55e-13Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in z around 0 81.2%
Taylor expanded in x around inf 42.9%
Final simplification46.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.8e+38) (not (<= z 3.1e+41))) (* z (+ y (* a b))) (+ x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.8e+38) || !(z <= 3.1e+41)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3.8d+38)) .or. (.not. (z <= 3.1d+41))) then
tmp = z * (y + (a * b))
else
tmp = x + (t * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.8e+38) || !(z <= 3.1e+41)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.8e+38) or not (z <= 3.1e+41): tmp = z * (y + (a * b)) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.8e+38) || !(z <= 3.1e+41)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.8e+38) || ~((z <= 3.1e+41))) tmp = z * (y + (a * b)); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.8e+38], N[Not[LessEqual[z, 3.1e+41]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+38} \lor \neg \left(z \leq 3.1 \cdot 10^{+41}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -3.7999999999999998e38 or 3.1e41 < z Initial program 76.2%
associate-+l+76.2%
associate-*l*79.4%
Simplified79.4%
Taylor expanded in z around inf 79.7%
if -3.7999999999999998e38 < z < 3.1e41Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in z around 0 79.3%
Final simplification79.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.15e+76) (not (<= a 5e-13))) (* a (+ t (* z b))) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.15e+76) || !(a <= 5e-13)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.15d+76)) .or. (.not. (a <= 5d-13))) then
tmp = a * (t + (z * b))
else
tmp = x + (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.15e+76) || !(a <= 5e-13)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.15e+76) or not (a <= 5e-13): tmp = a * (t + (z * b)) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.15e+76) || !(a <= 5e-13)) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.15e+76) || ~((a <= 5e-13))) tmp = a * (t + (z * b)); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.15e+76], N[Not[LessEqual[a, 5e-13]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{+76} \lor \neg \left(a \leq 5 \cdot 10^{-13}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -1.15000000000000001e76 or 4.9999999999999999e-13 < a Initial program 78.6%
associate-+l+78.6%
+-commutative78.6%
fma-define78.6%
associate-*l*88.7%
*-commutative88.7%
*-commutative88.7%
distribute-rgt-out94.7%
*-commutative94.7%
Simplified94.7%
Taylor expanded in y around 0 85.0%
Taylor expanded in x around 0 75.2%
if -1.15000000000000001e76 < a < 4.9999999999999999e-13Initial program 97.1%
associate-+l+97.1%
associate-*l*91.7%
Simplified91.7%
Taylor expanded in b around 0 84.2%
Taylor expanded in a around 0 72.6%
*-commutative72.6%
Simplified72.6%
Final simplification73.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1e+62) (not (<= a 8.5e-56))) (* t a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1e+62) || !(a <= 8.5e-56)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1d+62)) .or. (.not. (a <= 8.5d-56))) then
tmp = t * a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1e+62) || !(a <= 8.5e-56)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1e+62) or not (a <= 8.5e-56): tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1e+62) || !(a <= 8.5e-56)) tmp = Float64(t * a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1e+62) || ~((a <= 8.5e-56))) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1e+62], N[Not[LessEqual[a, 8.5e-56]], $MachinePrecision]], N[(t * a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+62} \lor \neg \left(a \leq 8.5 \cdot 10^{-56}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.00000000000000004e62 or 8.49999999999999932e-56 < a Initial program 79.3%
associate-+l+79.3%
associate-*l*88.7%
Simplified88.7%
Taylor expanded in z around 0 56.0%
Taylor expanded in x around 0 47.1%
if -1.00000000000000004e62 < a < 8.49999999999999932e-56Initial program 97.7%
associate-+l+97.7%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in z around 0 50.2%
Taylor expanded in x around inf 39.2%
Final simplification43.0%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 88.8%
associate-+l+88.8%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in z around 0 53.0%
Taylor expanded in x around inf 25.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(if (< z -11820553527347888000.0)
t_1
(if (< z 4.7589743188364287e-122)
(+ (* (+ (* b z) t) a) (+ (* z y) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z * ((b * a) + y)) + (x + (t * a))
if (z < (-11820553527347888000.0d0)) then
tmp = t_1
else if (z < 4.7589743188364287d-122) then
tmp = (((b * z) + t) * a) + ((z * y) + x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * ((b * a) + y)) + (x + (t * a)) tmp = 0 if z < -11820553527347888000.0: tmp = t_1 elif z < 4.7589743188364287e-122: tmp = (((b * z) + t) * a) + ((z * y) + x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(b * a) + y)) + Float64(x + Float64(t * a))) tmp = 0.0 if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = Float64(Float64(Float64(Float64(b * z) + t) * a) + Float64(Float64(z * y) + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * ((b * a) + y)) + (x + (t * a)); tmp = 0.0; if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = (((b * z) + t) * a) + ((z * y) + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(b * a), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -11820553527347888000.0], t$95$1, If[Less[z, 4.7589743188364287e-122], N[(N[(N[(N[(b * z), $MachinePrecision] + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\
\mathbf{if}\;z < -11820553527347888000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024146
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:alt
(! :herbie-platform default (if (< z -11820553527347888000) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 47589743188364287/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a))))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))