
(FPCore (x y z t) :precision binary64 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t): return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t): return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\end{array}
(FPCore (x y z t) :precision binary64 (fma y 5.0 (* x (+ (* (+ y z) 2.0) t))))
double code(double x, double y, double z, double t) {
return fma(y, 5.0, (x * (((y + z) * 2.0) + t)));
}
function code(x, y, z, t) return fma(y, 5.0, Float64(x * Float64(Float64(Float64(y + z) * 2.0) + t))) end
code[x_, y_, z_, t_] := N[(y * 5.0 + N[(x * N[(N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, 5, x \cdot \left(\left(y + z\right) \cdot 2 + t\right)\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
fma-def100.0%
associate-+l+100.0%
*-un-lft-identity100.0%
+-commutative100.0%
*-un-lft-identity100.0%
distribute-rgt-out100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (* x z))))
(if (<= t -1.12e+100)
(* x t)
(if (<= t -8e-119)
(* y 5.0)
(if (<= t -1.75e-222)
t_1
(if (<= t -1.25e-291)
(* y 5.0)
(if (<= t 1.56e-254)
t_1
(if (<= t 5.2e-225)
(* y 5.0)
(if (<= t 8.5e-188)
(* y x)
(if (<= t 1.8e-159)
(/ y 0.2)
(if (<= t 9e-34) t_1 (* x t))))))))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double tmp;
if (t <= -1.12e+100) {
tmp = x * t;
} else if (t <= -8e-119) {
tmp = y * 5.0;
} else if (t <= -1.75e-222) {
tmp = t_1;
} else if (t <= -1.25e-291) {
tmp = y * 5.0;
} else if (t <= 1.56e-254) {
tmp = t_1;
} else if (t <= 5.2e-225) {
tmp = y * 5.0;
} else if (t <= 8.5e-188) {
tmp = y * x;
} else if (t <= 1.8e-159) {
tmp = y / 0.2;
} else if (t <= 9e-34) {
tmp = t_1;
} else {
tmp = x * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (x * z)
if (t <= (-1.12d+100)) then
tmp = x * t
else if (t <= (-8d-119)) then
tmp = y * 5.0d0
else if (t <= (-1.75d-222)) then
tmp = t_1
else if (t <= (-1.25d-291)) then
tmp = y * 5.0d0
else if (t <= 1.56d-254) then
tmp = t_1
else if (t <= 5.2d-225) then
tmp = y * 5.0d0
else if (t <= 8.5d-188) then
tmp = y * x
else if (t <= 1.8d-159) then
tmp = y / 0.2d0
else if (t <= 9d-34) then
tmp = t_1
else
tmp = x * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double tmp;
if (t <= -1.12e+100) {
tmp = x * t;
} else if (t <= -8e-119) {
tmp = y * 5.0;
} else if (t <= -1.75e-222) {
tmp = t_1;
} else if (t <= -1.25e-291) {
tmp = y * 5.0;
} else if (t <= 1.56e-254) {
tmp = t_1;
} else if (t <= 5.2e-225) {
tmp = y * 5.0;
} else if (t <= 8.5e-188) {
tmp = y * x;
} else if (t <= 1.8e-159) {
tmp = y / 0.2;
} else if (t <= 9e-34) {
tmp = t_1;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * (x * z) tmp = 0 if t <= -1.12e+100: tmp = x * t elif t <= -8e-119: tmp = y * 5.0 elif t <= -1.75e-222: tmp = t_1 elif t <= -1.25e-291: tmp = y * 5.0 elif t <= 1.56e-254: tmp = t_1 elif t <= 5.2e-225: tmp = y * 5.0 elif t <= 8.5e-188: tmp = y * x elif t <= 1.8e-159: tmp = y / 0.2 elif t <= 9e-34: tmp = t_1 else: tmp = x * t return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(x * z)) tmp = 0.0 if (t <= -1.12e+100) tmp = Float64(x * t); elseif (t <= -8e-119) tmp = Float64(y * 5.0); elseif (t <= -1.75e-222) tmp = t_1; elseif (t <= -1.25e-291) tmp = Float64(y * 5.0); elseif (t <= 1.56e-254) tmp = t_1; elseif (t <= 5.2e-225) tmp = Float64(y * 5.0); elseif (t <= 8.5e-188) tmp = Float64(y * x); elseif (t <= 1.8e-159) tmp = Float64(y / 0.2); elseif (t <= 9e-34) tmp = t_1; else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * (x * z); tmp = 0.0; if (t <= -1.12e+100) tmp = x * t; elseif (t <= -8e-119) tmp = y * 5.0; elseif (t <= -1.75e-222) tmp = t_1; elseif (t <= -1.25e-291) tmp = y * 5.0; elseif (t <= 1.56e-254) tmp = t_1; elseif (t <= 5.2e-225) tmp = y * 5.0; elseif (t <= 8.5e-188) tmp = y * x; elseif (t <= 1.8e-159) tmp = y / 0.2; elseif (t <= 9e-34) tmp = t_1; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.12e+100], N[(x * t), $MachinePrecision], If[LessEqual[t, -8e-119], N[(y * 5.0), $MachinePrecision], If[LessEqual[t, -1.75e-222], t$95$1, If[LessEqual[t, -1.25e-291], N[(y * 5.0), $MachinePrecision], If[LessEqual[t, 1.56e-254], t$95$1, If[LessEqual[t, 5.2e-225], N[(y * 5.0), $MachinePrecision], If[LessEqual[t, 8.5e-188], N[(y * x), $MachinePrecision], If[LessEqual[t, 1.8e-159], N[(y / 0.2), $MachinePrecision], If[LessEqual[t, 9e-34], t$95$1, N[(x * t), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;t \leq -1.12 \cdot 10^{+100}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-119}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-222}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-291}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;t \leq 1.56 \cdot 10^{-254}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-225}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-188}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-159}:\\
\;\;\;\;\frac{y}{0.2}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if t < -1.12e100 or 9.00000000000000085e-34 < t Initial program 100.0%
Taylor expanded in t around inf 68.3%
if -1.12e100 < t < -8.0000000000000001e-119 or -1.75000000000000012e-222 < t < -1.2500000000000001e-291 or 1.56e-254 < t < 5.20000000000000027e-225Initial program 99.9%
Taylor expanded in x around 0 49.3%
if -8.0000000000000001e-119 < t < -1.75000000000000012e-222 or -1.2500000000000001e-291 < t < 1.56e-254 or 1.80000000000000011e-159 < t < 9.00000000000000085e-34Initial program 100.0%
Taylor expanded in z around inf 58.5%
if 5.20000000000000027e-225 < t < 8.5000000000000004e-188Initial program 100.0%
Taylor expanded in y around 0 91.0%
Simplified91.0%
Taylor expanded in y around inf 69.8%
Taylor expanded in x around inf 59.1%
if 8.5000000000000004e-188 < t < 1.80000000000000011e-159Initial program 99.6%
Taylor expanded in y around inf 84.1%
Simplified84.1%
*-commutative84.1%
flip-+70.6%
associate-*l/57.3%
metadata-eval57.3%
swap-sqr57.3%
metadata-eval57.3%
Applied egg-rr57.3%
Taylor expanded in y around 0 57.3%
associate-/l*70.6%
cancel-sign-sub-inv70.6%
metadata-eval70.6%
*-commutative70.6%
cancel-sign-sub-inv70.6%
metadata-eval70.6%
unpow270.6%
Simplified70.6%
Taylor expanded in x around 0 55.8%
Final simplification59.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (* x z))) (t_2 (* y (+ 5.0 x))))
(if (<= t -2.05e+102)
(* x t)
(if (<= t -1.55e-149)
t_2
(if (<= t -5.6e-195)
t_1
(if (<= t 1.1e-299)
t_2
(if (<= t 6.4e-254)
t_1
(if (<= t 6.8e-158) t_2 (if (<= t 2.2e-33) t_1 (* x t))))))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double t_2 = y * (5.0 + x);
double tmp;
if (t <= -2.05e+102) {
tmp = x * t;
} else if (t <= -1.55e-149) {
tmp = t_2;
} else if (t <= -5.6e-195) {
tmp = t_1;
} else if (t <= 1.1e-299) {
tmp = t_2;
} else if (t <= 6.4e-254) {
tmp = t_1;
} else if (t <= 6.8e-158) {
tmp = t_2;
} else if (t <= 2.2e-33) {
tmp = t_1;
} else {
tmp = x * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 2.0d0 * (x * z)
t_2 = y * (5.0d0 + x)
if (t <= (-2.05d+102)) then
tmp = x * t
else if (t <= (-1.55d-149)) then
tmp = t_2
else if (t <= (-5.6d-195)) then
tmp = t_1
else if (t <= 1.1d-299) then
tmp = t_2
else if (t <= 6.4d-254) then
tmp = t_1
else if (t <= 6.8d-158) then
tmp = t_2
else if (t <= 2.2d-33) then
tmp = t_1
else
tmp = x * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double t_2 = y * (5.0 + x);
double tmp;
if (t <= -2.05e+102) {
tmp = x * t;
} else if (t <= -1.55e-149) {
tmp = t_2;
} else if (t <= -5.6e-195) {
tmp = t_1;
} else if (t <= 1.1e-299) {
tmp = t_2;
} else if (t <= 6.4e-254) {
tmp = t_1;
} else if (t <= 6.8e-158) {
tmp = t_2;
} else if (t <= 2.2e-33) {
tmp = t_1;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * (x * z) t_2 = y * (5.0 + x) tmp = 0 if t <= -2.05e+102: tmp = x * t elif t <= -1.55e-149: tmp = t_2 elif t <= -5.6e-195: tmp = t_1 elif t <= 1.1e-299: tmp = t_2 elif t <= 6.4e-254: tmp = t_1 elif t <= 6.8e-158: tmp = t_2 elif t <= 2.2e-33: tmp = t_1 else: tmp = x * t return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(x * z)) t_2 = Float64(y * Float64(5.0 + x)) tmp = 0.0 if (t <= -2.05e+102) tmp = Float64(x * t); elseif (t <= -1.55e-149) tmp = t_2; elseif (t <= -5.6e-195) tmp = t_1; elseif (t <= 1.1e-299) tmp = t_2; elseif (t <= 6.4e-254) tmp = t_1; elseif (t <= 6.8e-158) tmp = t_2; elseif (t <= 2.2e-33) tmp = t_1; else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * (x * z); t_2 = y * (5.0 + x); tmp = 0.0; if (t <= -2.05e+102) tmp = x * t; elseif (t <= -1.55e-149) tmp = t_2; elseif (t <= -5.6e-195) tmp = t_1; elseif (t <= 1.1e-299) tmp = t_2; elseif (t <= 6.4e-254) tmp = t_1; elseif (t <= 6.8e-158) tmp = t_2; elseif (t <= 2.2e-33) tmp = t_1; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(5.0 + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.05e+102], N[(x * t), $MachinePrecision], If[LessEqual[t, -1.55e-149], t$95$2, If[LessEqual[t, -5.6e-195], t$95$1, If[LessEqual[t, 1.1e-299], t$95$2, If[LessEqual[t, 6.4e-254], t$95$1, If[LessEqual[t, 6.8e-158], t$95$2, If[LessEqual[t, 2.2e-33], t$95$1, N[(x * t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot z\right)\\
t_2 := y \cdot \left(5 + x\right)\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{+102}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{-149}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-195}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-299}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-254}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-158}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if t < -2.05e102 or 2.20000000000000005e-33 < t Initial program 100.0%
Taylor expanded in t around inf 68.3%
if -2.05e102 < t < -1.54999999999999994e-149 or -5.60000000000000007e-195 < t < 1.1e-299 or 6.4e-254 < t < 6.7999999999999999e-158Initial program 99.9%
Taylor expanded in y around 0 88.6%
Simplified88.6%
Taylor expanded in y around inf 61.7%
if -1.54999999999999994e-149 < t < -5.60000000000000007e-195 or 1.1e-299 < t < 6.4e-254 or 6.7999999999999999e-158 < t < 2.20000000000000005e-33Initial program 100.0%
Taylor expanded in z around inf 62.0%
Final simplification64.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (* y 5.0) (* x (+ y t)))))
(if (<= y -3.6e+89)
t_1
(if (<= y -4.3e+54)
(* x (* (+ y z) 2.0))
(if (or (<= y -3.35e-18) (not (<= y 5e-14)))
t_1
(* x (+ t (* z 2.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y * 5.0) + (x * (y + t));
double tmp;
if (y <= -3.6e+89) {
tmp = t_1;
} else if (y <= -4.3e+54) {
tmp = x * ((y + z) * 2.0);
} else if ((y <= -3.35e-18) || !(y <= 5e-14)) {
tmp = t_1;
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y * 5.0d0) + (x * (y + t))
if (y <= (-3.6d+89)) then
tmp = t_1
else if (y <= (-4.3d+54)) then
tmp = x * ((y + z) * 2.0d0)
else if ((y <= (-3.35d-18)) .or. (.not. (y <= 5d-14))) then
tmp = t_1
else
tmp = x * (t + (z * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y * 5.0) + (x * (y + t));
double tmp;
if (y <= -3.6e+89) {
tmp = t_1;
} else if (y <= -4.3e+54) {
tmp = x * ((y + z) * 2.0);
} else if ((y <= -3.35e-18) || !(y <= 5e-14)) {
tmp = t_1;
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * 5.0) + (x * (y + t)) tmp = 0 if y <= -3.6e+89: tmp = t_1 elif y <= -4.3e+54: tmp = x * ((y + z) * 2.0) elif (y <= -3.35e-18) or not (y <= 5e-14): tmp = t_1 else: tmp = x * (t + (z * 2.0)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y * 5.0) + Float64(x * Float64(y + t))) tmp = 0.0 if (y <= -3.6e+89) tmp = t_1; elseif (y <= -4.3e+54) tmp = Float64(x * Float64(Float64(y + z) * 2.0)); elseif ((y <= -3.35e-18) || !(y <= 5e-14)) tmp = t_1; else tmp = Float64(x * Float64(t + Float64(z * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y * 5.0) + (x * (y + t)); tmp = 0.0; if (y <= -3.6e+89) tmp = t_1; elseif (y <= -4.3e+54) tmp = x * ((y + z) * 2.0); elseif ((y <= -3.35e-18) || ~((y <= 5e-14))) tmp = t_1; else tmp = x * (t + (z * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.6e+89], t$95$1, If[LessEqual[y, -4.3e+54], N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.35e-18], N[Not[LessEqual[y, 5e-14]], $MachinePrecision]], t$95$1, N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot 5 + x \cdot \left(y + t\right)\\
\mathbf{if}\;y \leq -3.6 \cdot 10^{+89}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.3 \cdot 10^{+54}:\\
\;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{elif}\;y \leq -3.35 \cdot 10^{-18} \lor \neg \left(y \leq 5 \cdot 10^{-14}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
if y < -3.6e89 or -4.29999999999999976e54 < y < -3.3499999999999999e-18 or 5.0000000000000002e-14 < y Initial program 99.9%
Taylor expanded in y around 0 91.1%
Simplified91.1%
Taylor expanded in z around 0 83.4%
+-commutative83.4%
Simplified83.4%
if -3.6e89 < y < -4.29999999999999976e54Initial program 100.0%
Taylor expanded in x around inf 87.7%
Taylor expanded in t around 0 87.7%
Taylor expanded in y around 0 87.7%
associate-*r*87.7%
associate-*r*87.7%
distribute-lft-in87.7%
*-commutative87.7%
associate-*r*87.7%
Simplified87.7%
if -3.3499999999999999e-18 < y < 5.0000000000000002e-14Initial program 99.9%
Taylor expanded in y around 0 82.7%
Final simplification83.2%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.5) (not (<= x 3.5e-9))) (* x (+ t (+ (* y 2.0) (* z 2.0)))) (+ (* y 5.0) (* x (+ t (+ y (+ z z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.5) || !(x <= 3.5e-9)) {
tmp = x * (t + ((y * 2.0) + (z * 2.0)));
} else {
tmp = (y * 5.0) + (x * (t + (y + (z + z))));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-2.5d0)) .or. (.not. (x <= 3.5d-9))) then
tmp = x * (t + ((y * 2.0d0) + (z * 2.0d0)))
else
tmp = (y * 5.0d0) + (x * (t + (y + (z + z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.5) || !(x <= 3.5e-9)) {
tmp = x * (t + ((y * 2.0) + (z * 2.0)));
} else {
tmp = (y * 5.0) + (x * (t + (y + (z + z))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.5) or not (x <= 3.5e-9): tmp = x * (t + ((y * 2.0) + (z * 2.0))) else: tmp = (y * 5.0) + (x * (t + (y + (z + z)))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.5) || !(x <= 3.5e-9)) tmp = Float64(x * Float64(t + Float64(Float64(y * 2.0) + Float64(z * 2.0)))); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y + Float64(z + z))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.5) || ~((x <= 3.5e-9))) tmp = x * (t + ((y * 2.0) + (z * 2.0))); else tmp = (y * 5.0) + (x * (t + (y + (z + z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.5], N[Not[LessEqual[x, 3.5e-9]], $MachinePrecision]], N[(x * N[(t + N[(N[(y * 2.0), $MachinePrecision] + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y + N[(z + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \lor \neg \left(x \leq 3.5 \cdot 10^{-9}\right):\\
\;\;\;\;x \cdot \left(t + \left(y \cdot 2 + z \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + \left(y + \left(z + z\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.5 or 3.4999999999999999e-9 < x Initial program 100.0%
Taylor expanded in x around inf 99.3%
if -2.5 < x < 3.4999999999999999e-9Initial program 99.8%
Taylor expanded in y around 0 99.6%
Simplified99.6%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ t (* y 2.0)))))
(if (<= x -3.9e+158)
t_1
(if (<= x -9.6e+86)
(* x (* (+ y z) 2.0))
(if (or (<= x -2.5e-57) (not (<= x 1.48e-89))) t_1 (* y 5.0))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + (y * 2.0));
double tmp;
if (x <= -3.9e+158) {
tmp = t_1;
} else if (x <= -9.6e+86) {
tmp = x * ((y + z) * 2.0);
} else if ((x <= -2.5e-57) || !(x <= 1.48e-89)) {
tmp = t_1;
} else {
tmp = y * 5.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (t + (y * 2.0d0))
if (x <= (-3.9d+158)) then
tmp = t_1
else if (x <= (-9.6d+86)) then
tmp = x * ((y + z) * 2.0d0)
else if ((x <= (-2.5d-57)) .or. (.not. (x <= 1.48d-89))) then
tmp = t_1
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t + (y * 2.0));
double tmp;
if (x <= -3.9e+158) {
tmp = t_1;
} else if (x <= -9.6e+86) {
tmp = x * ((y + z) * 2.0);
} else if ((x <= -2.5e-57) || !(x <= 1.48e-89)) {
tmp = t_1;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + (y * 2.0)) tmp = 0 if x <= -3.9e+158: tmp = t_1 elif x <= -9.6e+86: tmp = x * ((y + z) * 2.0) elif (x <= -2.5e-57) or not (x <= 1.48e-89): tmp = t_1 else: tmp = y * 5.0 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(y * 2.0))) tmp = 0.0 if (x <= -3.9e+158) tmp = t_1; elseif (x <= -9.6e+86) tmp = Float64(x * Float64(Float64(y + z) * 2.0)); elseif ((x <= -2.5e-57) || !(x <= 1.48e-89)) tmp = t_1; else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + (y * 2.0)); tmp = 0.0; if (x <= -3.9e+158) tmp = t_1; elseif (x <= -9.6e+86) tmp = x * ((y + z) * 2.0); elseif ((x <= -2.5e-57) || ~((x <= 1.48e-89))) tmp = t_1; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.9e+158], t$95$1, If[LessEqual[x, -9.6e+86], N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -2.5e-57], N[Not[LessEqual[x, 1.48e-89]], $MachinePrecision]], t$95$1, N[(y * 5.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + y \cdot 2\right)\\
\mathbf{if}\;x \leq -3.9 \cdot 10^{+158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -9.6 \cdot 10^{+86}:\\
\;\;\;\;x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-57} \lor \neg \left(x \leq 1.48 \cdot 10^{-89}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
if x < -3.9e158 or -9.6000000000000001e86 < x < -2.5000000000000001e-57 or 1.48000000000000007e-89 < x Initial program 100.0%
Taylor expanded in y around inf 73.8%
Taylor expanded in x around inf 69.3%
if -3.9e158 < x < -9.6000000000000001e86Initial program 100.0%
Taylor expanded in x around inf 100.0%
Taylor expanded in t around 0 94.1%
Taylor expanded in y around 0 94.1%
associate-*r*94.1%
associate-*r*94.1%
distribute-lft-in94.1%
*-commutative94.1%
associate-*r*94.1%
Simplified94.1%
if -2.5000000000000001e-57 < x < 1.48000000000000007e-89Initial program 99.8%
Taylor expanded in x around 0 67.7%
Final simplification70.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (+ 5.0 x))))
(if (<= y -2.6e+92)
t_1
(if (<= y 1.9e-13)
(* x (+ t (* z 2.0)))
(if (or (<= y 2.2e+84) (not (<= y 2.7e+264)))
t_1
(* x (+ t (* y 2.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (5.0 + x);
double tmp;
if (y <= -2.6e+92) {
tmp = t_1;
} else if (y <= 1.9e-13) {
tmp = x * (t + (z * 2.0));
} else if ((y <= 2.2e+84) || !(y <= 2.7e+264)) {
tmp = t_1;
} else {
tmp = x * (t + (y * 2.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * (5.0d0 + x)
if (y <= (-2.6d+92)) then
tmp = t_1
else if (y <= 1.9d-13) then
tmp = x * (t + (z * 2.0d0))
else if ((y <= 2.2d+84) .or. (.not. (y <= 2.7d+264))) then
tmp = t_1
else
tmp = x * (t + (y * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (5.0 + x);
double tmp;
if (y <= -2.6e+92) {
tmp = t_1;
} else if (y <= 1.9e-13) {
tmp = x * (t + (z * 2.0));
} else if ((y <= 2.2e+84) || !(y <= 2.7e+264)) {
tmp = t_1;
} else {
tmp = x * (t + (y * 2.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (5.0 + x) tmp = 0 if y <= -2.6e+92: tmp = t_1 elif y <= 1.9e-13: tmp = x * (t + (z * 2.0)) elif (y <= 2.2e+84) or not (y <= 2.7e+264): tmp = t_1 else: tmp = x * (t + (y * 2.0)) return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(5.0 + x)) tmp = 0.0 if (y <= -2.6e+92) tmp = t_1; elseif (y <= 1.9e-13) tmp = Float64(x * Float64(t + Float64(z * 2.0))); elseif ((y <= 2.2e+84) || !(y <= 2.7e+264)) tmp = t_1; else tmp = Float64(x * Float64(t + Float64(y * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (5.0 + x); tmp = 0.0; if (y <= -2.6e+92) tmp = t_1; elseif (y <= 1.9e-13) tmp = x * (t + (z * 2.0)); elseif ((y <= 2.2e+84) || ~((y <= 2.7e+264))) tmp = t_1; else tmp = x * (t + (y * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(5.0 + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+92], t$95$1, If[LessEqual[y, 1.9e-13], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.2e+84], N[Not[LessEqual[y, 2.7e+264]], $MachinePrecision]], t$95$1, N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(5 + x\right)\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+84} \lor \neg \left(y \leq 2.7 \cdot 10^{+264}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\end{array}
\end{array}
if y < -2.5999999999999999e92 or 1.9e-13 < y < 2.1999999999999998e84 or 2.7000000000000002e264 < y Initial program 99.9%
Taylor expanded in y around 0 91.9%
Simplified91.9%
Taylor expanded in y around inf 72.4%
if -2.5999999999999999e92 < y < 1.9e-13Initial program 99.9%
Taylor expanded in y around 0 78.9%
if 2.1999999999999998e84 < y < 2.7000000000000002e264Initial program 100.0%
Taylor expanded in y around inf 91.7%
Taylor expanded in x around inf 70.3%
Final simplification75.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (* (+ y z) 2.0))))
(if (<= t -1e+99)
(* x t)
(if (<= t 3.5e-253)
t_1
(if (<= t 3.5e-227)
(* y (+ 5.0 x))
(if (<= t 1.35e+37) t_1 (* x t)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((y + z) * 2.0);
double tmp;
if (t <= -1e+99) {
tmp = x * t;
} else if (t <= 3.5e-253) {
tmp = t_1;
} else if (t <= 3.5e-227) {
tmp = y * (5.0 + x);
} else if (t <= 1.35e+37) {
tmp = t_1;
} else {
tmp = x * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((y + z) * 2.0d0)
if (t <= (-1d+99)) then
tmp = x * t
else if (t <= 3.5d-253) then
tmp = t_1
else if (t <= 3.5d-227) then
tmp = y * (5.0d0 + x)
else if (t <= 1.35d+37) then
tmp = t_1
else
tmp = x * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * ((y + z) * 2.0);
double tmp;
if (t <= -1e+99) {
tmp = x * t;
} else if (t <= 3.5e-253) {
tmp = t_1;
} else if (t <= 3.5e-227) {
tmp = y * (5.0 + x);
} else if (t <= 1.35e+37) {
tmp = t_1;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((y + z) * 2.0) tmp = 0 if t <= -1e+99: tmp = x * t elif t <= 3.5e-253: tmp = t_1 elif t <= 3.5e-227: tmp = y * (5.0 + x) elif t <= 1.35e+37: tmp = t_1 else: tmp = x * t return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(y + z) * 2.0)) tmp = 0.0 if (t <= -1e+99) tmp = Float64(x * t); elseif (t <= 3.5e-253) tmp = t_1; elseif (t <= 3.5e-227) tmp = Float64(y * Float64(5.0 + x)); elseif (t <= 1.35e+37) tmp = t_1; else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((y + z) * 2.0); tmp = 0.0; if (t <= -1e+99) tmp = x * t; elseif (t <= 3.5e-253) tmp = t_1; elseif (t <= 3.5e-227) tmp = y * (5.0 + x); elseif (t <= 1.35e+37) tmp = t_1; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+99], N[(x * t), $MachinePrecision], If[LessEqual[t, 3.5e-253], t$95$1, If[LessEqual[t, 3.5e-227], N[(y * N[(5.0 + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+37], t$95$1, N[(x * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(\left(y + z\right) \cdot 2\right)\\
\mathbf{if}\;t \leq -1 \cdot 10^{+99}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-253}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-227}:\\
\;\;\;\;y \cdot \left(5 + x\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if t < -9.9999999999999997e98 or 1.34999999999999993e37 < t Initial program 100.0%
Taylor expanded in t around inf 70.6%
if -9.9999999999999997e98 < t < 3.50000000000000022e-253 or 3.5000000000000001e-227 < t < 1.34999999999999993e37Initial program 99.9%
Taylor expanded in x around inf 70.2%
Taylor expanded in t around 0 63.7%
Taylor expanded in y around 0 60.3%
associate-*r*60.3%
associate-*r*60.3%
distribute-lft-in63.7%
*-commutative63.7%
associate-*r*63.7%
Simplified63.7%
if 3.50000000000000022e-253 < t < 3.5000000000000001e-227Initial program 100.0%
Taylor expanded in y around 0 85.2%
Simplified85.2%
Taylor expanded in y around inf 85.2%
Final simplification67.3%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.15e-55) (not (<= x 6.5e-146))) (* x (+ t (+ (* y 2.0) (* z 2.0)))) (+ (* y 5.0) (* x (+ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.15e-55) || !(x <= 6.5e-146)) {
tmp = x * (t + ((y * 2.0) + (z * 2.0)));
} else {
tmp = (y * 5.0) + (x * (y + t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-1.15d-55)) .or. (.not. (x <= 6.5d-146))) then
tmp = x * (t + ((y * 2.0d0) + (z * 2.0d0)))
else
tmp = (y * 5.0d0) + (x * (y + t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.15e-55) || !(x <= 6.5e-146)) {
tmp = x * (t + ((y * 2.0) + (z * 2.0)));
} else {
tmp = (y * 5.0) + (x * (y + t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.15e-55) or not (x <= 6.5e-146): tmp = x * (t + ((y * 2.0) + (z * 2.0))) else: tmp = (y * 5.0) + (x * (y + t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.15e-55) || !(x <= 6.5e-146)) tmp = Float64(x * Float64(t + Float64(Float64(y * 2.0) + Float64(z * 2.0)))); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(y + t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.15e-55) || ~((x <= 6.5e-146))) tmp = x * (t + ((y * 2.0) + (z * 2.0))); else tmp = (y * 5.0) + (x * (y + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.15e-55], N[Not[LessEqual[x, 6.5e-146]], $MachinePrecision]], N[(x * N[(t + N[(N[(y * 2.0), $MachinePrecision] + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{-55} \lor \neg \left(x \leq 6.5 \cdot 10^{-146}\right):\\
\;\;\;\;x \cdot \left(t + \left(y \cdot 2 + z \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(y + t\right)\\
\end{array}
\end{array}
if x < -1.15000000000000006e-55 or 6.4999999999999999e-146 < x Initial program 100.0%
Taylor expanded in x around inf 95.5%
if -1.15000000000000006e-55 < x < 6.4999999999999999e-146Initial program 99.8%
Taylor expanded in y around 0 99.8%
Simplified99.8%
Taylor expanded in z around 0 82.6%
+-commutative82.6%
Simplified82.6%
Final simplification91.2%
(FPCore (x y z t) :precision binary64 (if (or (<= x -5e-53) (not (<= x 2.95e-121))) (* x (+ t (+ (* y 2.0) (* z 2.0)))) (+ (* y 5.0) (* x (+ y (* z 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5e-53) || !(x <= 2.95e-121)) {
tmp = x * (t + ((y * 2.0) + (z * 2.0)));
} else {
tmp = (y * 5.0) + (x * (y + (z * 2.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-5d-53)) .or. (.not. (x <= 2.95d-121))) then
tmp = x * (t + ((y * 2.0d0) + (z * 2.0d0)))
else
tmp = (y * 5.0d0) + (x * (y + (z * 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5e-53) || !(x <= 2.95e-121)) {
tmp = x * (t + ((y * 2.0) + (z * 2.0)));
} else {
tmp = (y * 5.0) + (x * (y + (z * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -5e-53) or not (x <= 2.95e-121): tmp = x * (t + ((y * 2.0) + (z * 2.0))) else: tmp = (y * 5.0) + (x * (y + (z * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -5e-53) || !(x <= 2.95e-121)) tmp = Float64(x * Float64(t + Float64(Float64(y * 2.0) + Float64(z * 2.0)))); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(y + Float64(z * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -5e-53) || ~((x <= 2.95e-121))) tmp = x * (t + ((y * 2.0) + (z * 2.0))); else tmp = (y * 5.0) + (x * (y + (z * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -5e-53], N[Not[LessEqual[x, 2.95e-121]], $MachinePrecision]], N[(x * N[(t + N[(N[(y * 2.0), $MachinePrecision] + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(y + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-53} \lor \neg \left(x \leq 2.95 \cdot 10^{-121}\right):\\
\;\;\;\;x \cdot \left(t + \left(y \cdot 2 + z \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(y + z \cdot 2\right)\\
\end{array}
\end{array}
if x < -5e-53 or 2.94999999999999998e-121 < x Initial program 100.0%
Taylor expanded in x around inf 96.0%
if -5e-53 < x < 2.94999999999999998e-121Initial program 99.8%
Taylor expanded in y around 0 99.8%
Simplified99.8%
Taylor expanded in t around 0 88.0%
Final simplification93.2%
(FPCore (x y z t) :precision binary64 (+ (* x (+ t (+ y (+ z (+ y z))))) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * (t + (y + (z + (y + z))))) + (y * 5.0);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * (t + (y + (z + (y + z))))) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * (t + (y + (z + (y + z))))) + (y * 5.0);
}
def code(x, y, z, t): return (x * (t + (y + (z + (y + z))))) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(t + Float64(y + Float64(z + Float64(y + z))))) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * (t + (y + (z + (y + z))))) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(t + N[(y + N[(z + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) + y \cdot 5
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t)
:precision binary64
(if (<= t -2.15e+101)
(* x t)
(if (<= t 1.12e-223)
(* y 5.0)
(if (<= t 8.5e-188) (* y x) (if (<= t 1.7e-33) (* y 5.0) (* x t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.15e+101) {
tmp = x * t;
} else if (t <= 1.12e-223) {
tmp = y * 5.0;
} else if (t <= 8.5e-188) {
tmp = y * x;
} else if (t <= 1.7e-33) {
tmp = y * 5.0;
} else {
tmp = x * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.15d+101)) then
tmp = x * t
else if (t <= 1.12d-223) then
tmp = y * 5.0d0
else if (t <= 8.5d-188) then
tmp = y * x
else if (t <= 1.7d-33) then
tmp = y * 5.0d0
else
tmp = x * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.15e+101) {
tmp = x * t;
} else if (t <= 1.12e-223) {
tmp = y * 5.0;
} else if (t <= 8.5e-188) {
tmp = y * x;
} else if (t <= 1.7e-33) {
tmp = y * 5.0;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2.15e+101: tmp = x * t elif t <= 1.12e-223: tmp = y * 5.0 elif t <= 8.5e-188: tmp = y * x elif t <= 1.7e-33: tmp = y * 5.0 else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2.15e+101) tmp = Float64(x * t); elseif (t <= 1.12e-223) tmp = Float64(y * 5.0); elseif (t <= 8.5e-188) tmp = Float64(y * x); elseif (t <= 1.7e-33) tmp = Float64(y * 5.0); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -2.15e+101) tmp = x * t; elseif (t <= 1.12e-223) tmp = y * 5.0; elseif (t <= 8.5e-188) tmp = y * x; elseif (t <= 1.7e-33) tmp = y * 5.0; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.15e+101], N[(x * t), $MachinePrecision], If[LessEqual[t, 1.12e-223], N[(y * 5.0), $MachinePrecision], If[LessEqual[t, 8.5e-188], N[(y * x), $MachinePrecision], If[LessEqual[t, 1.7e-33], N[(y * 5.0), $MachinePrecision], N[(x * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{+101}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-223}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-188}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-33}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if t < -2.15e101 or 1.7e-33 < t Initial program 100.0%
Taylor expanded in t around inf 68.3%
if -2.15e101 < t < 1.1199999999999999e-223 or 8.5000000000000004e-188 < t < 1.7e-33Initial program 99.9%
Taylor expanded in x around 0 39.0%
if 1.1199999999999999e-223 < t < 8.5000000000000004e-188Initial program 100.0%
Taylor expanded in y around 0 91.0%
Simplified91.0%
Taylor expanded in y around inf 69.8%
Taylor expanded in x around inf 59.1%
Final simplification51.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.3e+57) (not (<= y 6.3e-15))) (* y (+ 5.0 (* x 2.0))) (* x (+ t (* z 2.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.3e+57) || !(y <= 6.3e-15)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.3d+57)) .or. (.not. (y <= 6.3d-15))) then
tmp = y * (5.0d0 + (x * 2.0d0))
else
tmp = x * (t + (z * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.3e+57) || !(y <= 6.3e-15)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.3e+57) or not (y <= 6.3e-15): tmp = y * (5.0 + (x * 2.0)) else: tmp = x * (t + (z * 2.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.3e+57) || !(y <= 6.3e-15)) tmp = Float64(y * Float64(5.0 + Float64(x * 2.0))); else tmp = Float64(x * Float64(t + Float64(z * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.3e+57) || ~((y <= 6.3e-15))) tmp = y * (5.0 + (x * 2.0)); else tmp = x * (t + (z * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.3e+57], N[Not[LessEqual[y, 6.3e-15]], $MachinePrecision]], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+57} \lor \neg \left(y \leq 6.3 \cdot 10^{-15}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
if y < -2.2999999999999999e57 or 6.29999999999999982e-15 < y Initial program 99.9%
Taylor expanded in y around inf 75.0%
Simplified75.0%
if -2.2999999999999999e57 < y < 6.29999999999999982e-15Initial program 99.9%
Taylor expanded in y around 0 81.5%
Final simplification78.2%
(FPCore (x y z t) :precision binary64 (if (<= y -4.8e+54) (+ (* y 5.0) (* 2.0 (* y x))) (if (<= y 1.1e-13) (* x (+ t (* z 2.0))) (* y (+ 5.0 (* x 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+54) {
tmp = (y * 5.0) + (2.0 * (y * x));
} else if (y <= 1.1e-13) {
tmp = x * (t + (z * 2.0));
} else {
tmp = y * (5.0 + (x * 2.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.8d+54)) then
tmp = (y * 5.0d0) + (2.0d0 * (y * x))
else if (y <= 1.1d-13) then
tmp = x * (t + (z * 2.0d0))
else
tmp = y * (5.0d0 + (x * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+54) {
tmp = (y * 5.0) + (2.0 * (y * x));
} else if (y <= 1.1e-13) {
tmp = x * (t + (z * 2.0));
} else {
tmp = y * (5.0 + (x * 2.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.8e+54: tmp = (y * 5.0) + (2.0 * (y * x)) elif y <= 1.1e-13: tmp = x * (t + (z * 2.0)) else: tmp = y * (5.0 + (x * 2.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.8e+54) tmp = Float64(Float64(y * 5.0) + Float64(2.0 * Float64(y * x))); elseif (y <= 1.1e-13) tmp = Float64(x * Float64(t + Float64(z * 2.0))); else tmp = Float64(y * Float64(5.0 + Float64(x * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.8e+54) tmp = (y * 5.0) + (2.0 * (y * x)); elseif (y <= 1.1e-13) tmp = x * (t + (z * 2.0)); else tmp = y * (5.0 + (x * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.8e+54], N[(N[(y * 5.0), $MachinePrecision] + N[(2.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-13], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+54}:\\
\;\;\;\;y \cdot 5 + 2 \cdot \left(y \cdot x\right)\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\end{array}
\end{array}
if y < -4.79999999999999997e54Initial program 99.9%
Taylor expanded in y around inf 79.4%
if -4.79999999999999997e54 < y < 1.09999999999999998e-13Initial program 99.9%
Taylor expanded in y around 0 81.5%
if 1.09999999999999998e-13 < y Initial program 99.9%
Taylor expanded in y around inf 71.8%
Simplified71.8%
Final simplification78.3%
(FPCore (x y z t) :precision binary64 (if (<= t -1.3e+100) (* x t) (if (<= t 1.8e-33) (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.3e+100) {
tmp = x * t;
} else if (t <= 1.8e-33) {
tmp = y * 5.0;
} else {
tmp = x * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.3d+100)) then
tmp = x * t
else if (t <= 1.8d-33) then
tmp = y * 5.0d0
else
tmp = x * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.3e+100) {
tmp = x * t;
} else if (t <= 1.8e-33) {
tmp = y * 5.0;
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.3e+100: tmp = x * t elif t <= 1.8e-33: tmp = y * 5.0 else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.3e+100) tmp = Float64(x * t); elseif (t <= 1.8e-33) tmp = Float64(y * 5.0); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.3e+100) tmp = x * t; elseif (t <= 1.8e-33) tmp = y * 5.0; else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.3e+100], N[(x * t), $MachinePrecision], If[LessEqual[t, 1.8e-33], N[(y * 5.0), $MachinePrecision], N[(x * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+100}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-33}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
if t < -1.3000000000000001e100 or 1.80000000000000017e-33 < t Initial program 100.0%
Taylor expanded in t around inf 68.3%
if -1.3000000000000001e100 < t < 1.80000000000000017e-33Initial program 99.9%
Taylor expanded in x around 0 37.5%
Final simplification50.2%
(FPCore (x y z t) :precision binary64 (* y 5.0))
double code(double x, double y, double z, double t) {
return y * 5.0;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = y * 5.0d0
end function
public static double code(double x, double y, double z, double t) {
return y * 5.0;
}
def code(x, y, z, t): return y * 5.0
function code(x, y, z, t) return Float64(y * 5.0) end
function tmp = code(x, y, z, t) tmp = y * 5.0; end
code[x_, y_, z_, t_] := N[(y * 5.0), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 5
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 28.0%
Final simplification28.0%
herbie shell --seed 2023293
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, B"
:precision binary64
(+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))