
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
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) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
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) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
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) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ z 1.0))) (t_2 (* y (- t x))) (t_3 (- x (* z t))))
(if (<= y -430.0)
t_2
(if (<= y -1.1e-132)
t_3
(if (<= y -3.2e-213)
t_1
(if (<= y -1.02e-303)
t_3
(if (<= y 2.6e-163) t_1 (if (<= y 5.5e-46) t_3 t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z + 1.0);
double t_2 = y * (t - x);
double t_3 = x - (z * t);
double tmp;
if (y <= -430.0) {
tmp = t_2;
} else if (y <= -1.1e-132) {
tmp = t_3;
} else if (y <= -3.2e-213) {
tmp = t_1;
} else if (y <= -1.02e-303) {
tmp = t_3;
} else if (y <= 2.6e-163) {
tmp = t_1;
} else if (y <= 5.5e-46) {
tmp = t_3;
} else {
tmp = t_2;
}
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) :: t_3
real(8) :: tmp
t_1 = x * (z + 1.0d0)
t_2 = y * (t - x)
t_3 = x - (z * t)
if (y <= (-430.0d0)) then
tmp = t_2
else if (y <= (-1.1d-132)) then
tmp = t_3
else if (y <= (-3.2d-213)) then
tmp = t_1
else if (y <= (-1.02d-303)) then
tmp = t_3
else if (y <= 2.6d-163) then
tmp = t_1
else if (y <= 5.5d-46) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (z + 1.0);
double t_2 = y * (t - x);
double t_3 = x - (z * t);
double tmp;
if (y <= -430.0) {
tmp = t_2;
} else if (y <= -1.1e-132) {
tmp = t_3;
} else if (y <= -3.2e-213) {
tmp = t_1;
} else if (y <= -1.02e-303) {
tmp = t_3;
} else if (y <= 2.6e-163) {
tmp = t_1;
} else if (y <= 5.5e-46) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z + 1.0) t_2 = y * (t - x) t_3 = x - (z * t) tmp = 0 if y <= -430.0: tmp = t_2 elif y <= -1.1e-132: tmp = t_3 elif y <= -3.2e-213: tmp = t_1 elif y <= -1.02e-303: tmp = t_3 elif y <= 2.6e-163: tmp = t_1 elif y <= 5.5e-46: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z + 1.0)) t_2 = Float64(y * Float64(t - x)) t_3 = Float64(x - Float64(z * t)) tmp = 0.0 if (y <= -430.0) tmp = t_2; elseif (y <= -1.1e-132) tmp = t_3; elseif (y <= -3.2e-213) tmp = t_1; elseif (y <= -1.02e-303) tmp = t_3; elseif (y <= 2.6e-163) tmp = t_1; elseif (y <= 5.5e-46) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z + 1.0); t_2 = y * (t - x); t_3 = x - (z * t); tmp = 0.0; if (y <= -430.0) tmp = t_2; elseif (y <= -1.1e-132) tmp = t_3; elseif (y <= -3.2e-213) tmp = t_1; elseif (y <= -1.02e-303) tmp = t_3; elseif (y <= 2.6e-163) tmp = t_1; elseif (y <= 5.5e-46) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -430.0], t$95$2, If[LessEqual[y, -1.1e-132], t$95$3, If[LessEqual[y, -3.2e-213], t$95$1, If[LessEqual[y, -1.02e-303], t$95$3, If[LessEqual[y, 2.6e-163], t$95$1, If[LessEqual[y, 5.5e-46], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(z + 1\right)\\
t_2 := y \cdot \left(t - x\right)\\
t_3 := x - z \cdot t\\
\mathbf{if}\;y \leq -430:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-132}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-213}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-303}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-163}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-46}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -430 or 5.49999999999999983e-46 < y Initial program 100.0%
Taylor expanded in y around inf 79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in x around -inf 76.4%
+-commutative76.4%
mul-1-neg76.4%
unsub-neg76.4%
sub-neg76.4%
metadata-eval76.4%
Simplified76.4%
Taylor expanded in y around inf 78.7%
if -430 < y < -1.09999999999999995e-132 or -3.19999999999999972e-213 < y < -1.01999999999999996e-303 or 2.60000000000000002e-163 < y < 5.49999999999999983e-46Initial program 100.0%
Taylor expanded in t around inf 84.7%
Taylor expanded in y around 0 73.0%
mul-1-neg73.0%
unsub-neg73.0%
Simplified73.0%
if -1.09999999999999995e-132 < y < -3.19999999999999972e-213 or -1.01999999999999996e-303 < y < 2.60000000000000002e-163Initial program 100.0%
Taylor expanded in x around inf 74.4%
mul-1-neg74.4%
unsub-neg74.4%
Simplified74.4%
Taylor expanded in y around 0 74.4%
+-commutative74.4%
Simplified74.4%
Final simplification76.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (* x (+ z 1.0))))
(if (<= y -1.05e+17)
t_1
(if (<= y -2.8e-44)
t_2
(if (<= y -9.5e-49)
(* y t)
(if (<= y -8.5e-130) (* z (- t)) (if (<= y 2.6e-9) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = x * (z + 1.0);
double tmp;
if (y <= -1.05e+17) {
tmp = t_1;
} else if (y <= -2.8e-44) {
tmp = t_2;
} else if (y <= -9.5e-49) {
tmp = y * t;
} else if (y <= -8.5e-130) {
tmp = z * -t;
} else if (y <= 2.6e-9) {
tmp = t_2;
} else {
tmp = t_1;
}
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 = y * (t - x)
t_2 = x * (z + 1.0d0)
if (y <= (-1.05d+17)) then
tmp = t_1
else if (y <= (-2.8d-44)) then
tmp = t_2
else if (y <= (-9.5d-49)) then
tmp = y * t
else if (y <= (-8.5d-130)) then
tmp = z * -t
else if (y <= 2.6d-9) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = x * (z + 1.0);
double tmp;
if (y <= -1.05e+17) {
tmp = t_1;
} else if (y <= -2.8e-44) {
tmp = t_2;
} else if (y <= -9.5e-49) {
tmp = y * t;
} else if (y <= -8.5e-130) {
tmp = z * -t;
} else if (y <= 2.6e-9) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = x * (z + 1.0) tmp = 0 if y <= -1.05e+17: tmp = t_1 elif y <= -2.8e-44: tmp = t_2 elif y <= -9.5e-49: tmp = y * t elif y <= -8.5e-130: tmp = z * -t elif y <= 2.6e-9: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) t_2 = Float64(x * Float64(z + 1.0)) tmp = 0.0 if (y <= -1.05e+17) tmp = t_1; elseif (y <= -2.8e-44) tmp = t_2; elseif (y <= -9.5e-49) tmp = Float64(y * t); elseif (y <= -8.5e-130) tmp = Float64(z * Float64(-t)); elseif (y <= 2.6e-9) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); t_2 = x * (z + 1.0); tmp = 0.0; if (y <= -1.05e+17) tmp = t_1; elseif (y <= -2.8e-44) tmp = t_2; elseif (y <= -9.5e-49) tmp = y * t; elseif (y <= -8.5e-130) tmp = z * -t; elseif (y <= 2.6e-9) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.05e+17], t$95$1, If[LessEqual[y, -2.8e-44], t$95$2, If[LessEqual[y, -9.5e-49], N[(y * t), $MachinePrecision], If[LessEqual[y, -8.5e-130], N[(z * (-t)), $MachinePrecision], If[LessEqual[y, 2.6e-9], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := x \cdot \left(z + 1\right)\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-44}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-49}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-130}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-9}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.05e17 or 2.6000000000000001e-9 < y Initial program 100.0%
Taylor expanded in y around inf 83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in x around -inf 80.3%
+-commutative80.3%
mul-1-neg80.3%
unsub-neg80.3%
sub-neg80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in y around inf 83.2%
if -1.05e17 < y < -2.8e-44 or -8.50000000000000033e-130 < y < 2.6000000000000001e-9Initial program 100.0%
Taylor expanded in x around inf 63.5%
mul-1-neg63.5%
unsub-neg63.5%
Simplified63.5%
Taylor expanded in y around 0 62.7%
+-commutative62.7%
Simplified62.7%
if -2.8e-44 < y < -9.50000000000000006e-49Initial program 100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around 0 100.0%
if -9.50000000000000006e-49 < y < -8.50000000000000033e-130Initial program 100.0%
Taylor expanded in t around inf 84.6%
Taylor expanded in y around 0 68.4%
mul-1-neg68.4%
unsub-neg68.4%
Simplified68.4%
Taylor expanded in x around 0 51.9%
associate-*r*51.9%
neg-mul-151.9%
Simplified51.9%
Final simplification71.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (* x (+ z 1.0))))
(if (<= y -1.2e+17)
t_1
(if (<= y -1.16e-31)
t_2
(if (<= y -2e-76)
(+ x (* y t))
(if (<= y -1.3e-128) (* z (- t)) (if (<= y 1.02e-7) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = x * (z + 1.0);
double tmp;
if (y <= -1.2e+17) {
tmp = t_1;
} else if (y <= -1.16e-31) {
tmp = t_2;
} else if (y <= -2e-76) {
tmp = x + (y * t);
} else if (y <= -1.3e-128) {
tmp = z * -t;
} else if (y <= 1.02e-7) {
tmp = t_2;
} else {
tmp = t_1;
}
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 = y * (t - x)
t_2 = x * (z + 1.0d0)
if (y <= (-1.2d+17)) then
tmp = t_1
else if (y <= (-1.16d-31)) then
tmp = t_2
else if (y <= (-2d-76)) then
tmp = x + (y * t)
else if (y <= (-1.3d-128)) then
tmp = z * -t
else if (y <= 1.02d-7) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = x * (z + 1.0);
double tmp;
if (y <= -1.2e+17) {
tmp = t_1;
} else if (y <= -1.16e-31) {
tmp = t_2;
} else if (y <= -2e-76) {
tmp = x + (y * t);
} else if (y <= -1.3e-128) {
tmp = z * -t;
} else if (y <= 1.02e-7) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = x * (z + 1.0) tmp = 0 if y <= -1.2e+17: tmp = t_1 elif y <= -1.16e-31: tmp = t_2 elif y <= -2e-76: tmp = x + (y * t) elif y <= -1.3e-128: tmp = z * -t elif y <= 1.02e-7: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t - x)) t_2 = Float64(x * Float64(z + 1.0)) tmp = 0.0 if (y <= -1.2e+17) tmp = t_1; elseif (y <= -1.16e-31) tmp = t_2; elseif (y <= -2e-76) tmp = Float64(x + Float64(y * t)); elseif (y <= -1.3e-128) tmp = Float64(z * Float64(-t)); elseif (y <= 1.02e-7) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t - x); t_2 = x * (z + 1.0); tmp = 0.0; if (y <= -1.2e+17) tmp = t_1; elseif (y <= -1.16e-31) tmp = t_2; elseif (y <= -2e-76) tmp = x + (y * t); elseif (y <= -1.3e-128) tmp = z * -t; elseif (y <= 1.02e-7) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e+17], t$95$1, If[LessEqual[y, -1.16e-31], t$95$2, If[LessEqual[y, -2e-76], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.3e-128], N[(z * (-t)), $MachinePrecision], If[LessEqual[y, 1.02e-7], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := x \cdot \left(z + 1\right)\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.16 \cdot 10^{-31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-76}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-128}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.2e17 or 1.02e-7 < y Initial program 100.0%
Taylor expanded in y around inf 83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in x around -inf 80.3%
+-commutative80.3%
mul-1-neg80.3%
unsub-neg80.3%
sub-neg80.3%
metadata-eval80.3%
Simplified80.3%
Taylor expanded in y around inf 83.2%
if -1.2e17 < y < -1.15999999999999998e-31 or -1.2999999999999999e-128 < y < 1.02e-7Initial program 100.0%
Taylor expanded in x around inf 63.1%
mul-1-neg63.1%
unsub-neg63.1%
Simplified63.1%
Taylor expanded in y around 0 62.4%
+-commutative62.4%
Simplified62.4%
if -1.15999999999999998e-31 < y < -1.99999999999999985e-76Initial program 100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in z around 0 84.1%
if -1.99999999999999985e-76 < y < -1.2999999999999999e-128Initial program 100.0%
Taylor expanded in t around inf 81.6%
Taylor expanded in y around 0 68.5%
mul-1-neg68.5%
unsub-neg68.5%
Simplified68.5%
Taylor expanded in x around 0 54.8%
associate-*r*54.8%
neg-mul-154.8%
Simplified54.8%
Final simplification72.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- y))))
(if (<= y -1.82e+146)
t_1
(if (<= y -2.8e+108)
(* y t)
(if (<= y -8.2e+27)
t_1
(if (<= y 26.5) (* x (+ z 1.0)) (if (<= y 5e+59) (* y t) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * -y;
double tmp;
if (y <= -1.82e+146) {
tmp = t_1;
} else if (y <= -2.8e+108) {
tmp = y * t;
} else if (y <= -8.2e+27) {
tmp = t_1;
} else if (y <= 26.5) {
tmp = x * (z + 1.0);
} else if (y <= 5e+59) {
tmp = y * t;
} else {
tmp = t_1;
}
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
if (y <= (-1.82d+146)) then
tmp = t_1
else if (y <= (-2.8d+108)) then
tmp = y * t
else if (y <= (-8.2d+27)) then
tmp = t_1
else if (y <= 26.5d0) then
tmp = x * (z + 1.0d0)
else if (y <= 5d+59) then
tmp = y * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * -y;
double tmp;
if (y <= -1.82e+146) {
tmp = t_1;
} else if (y <= -2.8e+108) {
tmp = y * t;
} else if (y <= -8.2e+27) {
tmp = t_1;
} else if (y <= 26.5) {
tmp = x * (z + 1.0);
} else if (y <= 5e+59) {
tmp = y * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * -y tmp = 0 if y <= -1.82e+146: tmp = t_1 elif y <= -2.8e+108: tmp = y * t elif y <= -8.2e+27: tmp = t_1 elif y <= 26.5: tmp = x * (z + 1.0) elif y <= 5e+59: tmp = y * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(-y)) tmp = 0.0 if (y <= -1.82e+146) tmp = t_1; elseif (y <= -2.8e+108) tmp = Float64(y * t); elseif (y <= -8.2e+27) tmp = t_1; elseif (y <= 26.5) tmp = Float64(x * Float64(z + 1.0)); elseif (y <= 5e+59) tmp = Float64(y * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * -y; tmp = 0.0; if (y <= -1.82e+146) tmp = t_1; elseif (y <= -2.8e+108) tmp = y * t; elseif (y <= -8.2e+27) tmp = t_1; elseif (y <= 26.5) tmp = x * (z + 1.0); elseif (y <= 5e+59) tmp = y * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * (-y)), $MachinePrecision]}, If[LessEqual[y, -1.82e+146], t$95$1, If[LessEqual[y, -2.8e+108], N[(y * t), $MachinePrecision], If[LessEqual[y, -8.2e+27], t$95$1, If[LessEqual[y, 26.5], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+59], N[(y * t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(-y\right)\\
\mathbf{if}\;y \leq -1.82 \cdot 10^{+146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{+108}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 26.5:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+59}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.82e146 or -2.7999999999999998e108 < y < -8.2000000000000005e27 or 4.9999999999999997e59 < y Initial program 100.0%
Taylor expanded in x around inf 65.8%
mul-1-neg65.8%
unsub-neg65.8%
Simplified65.8%
Taylor expanded in z around 0 60.0%
Taylor expanded in y around inf 60.0%
mul-1-neg60.0%
distribute-rgt-neg-out60.0%
Simplified60.0%
if -1.82e146 < y < -2.7999999999999998e108 or 26.5 < y < 4.9999999999999997e59Initial program 99.9%
Taylor expanded in t around inf 66.9%
Taylor expanded in z around 0 60.5%
Taylor expanded in x around 0 61.0%
if -8.2000000000000005e27 < y < 26.5Initial program 100.0%
Taylor expanded in x around inf 57.5%
mul-1-neg57.5%
unsub-neg57.5%
Simplified57.5%
Taylor expanded in y around 0 56.2%
+-commutative56.2%
Simplified56.2%
Final simplification58.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* z t))))
(if (<= t -4.1e+258)
t_1
(if (<= t -1.05e+92)
(+ x (* y t))
(if (<= t 5.5e+88)
(* x (+ (- z y) 1.0))
(if (<= t 6.2e+243) t_1 (* y (- t x))))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (z * t);
double tmp;
if (t <= -4.1e+258) {
tmp = t_1;
} else if (t <= -1.05e+92) {
tmp = x + (y * t);
} else if (t <= 5.5e+88) {
tmp = x * ((z - y) + 1.0);
} else if (t <= 6.2e+243) {
tmp = t_1;
} else {
tmp = y * (t - x);
}
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 - (z * t)
if (t <= (-4.1d+258)) then
tmp = t_1
else if (t <= (-1.05d+92)) then
tmp = x + (y * t)
else if (t <= 5.5d+88) then
tmp = x * ((z - y) + 1.0d0)
else if (t <= 6.2d+243) then
tmp = t_1
else
tmp = y * (t - x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x - (z * t);
double tmp;
if (t <= -4.1e+258) {
tmp = t_1;
} else if (t <= -1.05e+92) {
tmp = x + (y * t);
} else if (t <= 5.5e+88) {
tmp = x * ((z - y) + 1.0);
} else if (t <= 6.2e+243) {
tmp = t_1;
} else {
tmp = y * (t - x);
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (z * t) tmp = 0 if t <= -4.1e+258: tmp = t_1 elif t <= -1.05e+92: tmp = x + (y * t) elif t <= 5.5e+88: tmp = x * ((z - y) + 1.0) elif t <= 6.2e+243: tmp = t_1 else: tmp = y * (t - x) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(z * t)) tmp = 0.0 if (t <= -4.1e+258) tmp = t_1; elseif (t <= -1.05e+92) tmp = Float64(x + Float64(y * t)); elseif (t <= 5.5e+88) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); elseif (t <= 6.2e+243) tmp = t_1; else tmp = Float64(y * Float64(t - x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (z * t); tmp = 0.0; if (t <= -4.1e+258) tmp = t_1; elseif (t <= -1.05e+92) tmp = x + (y * t); elseif (t <= 5.5e+88) tmp = x * ((z - y) + 1.0); elseif (t <= 6.2e+243) tmp = t_1; else tmp = y * (t - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.1e+258], t$95$1, If[LessEqual[t, -1.05e+92], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+88], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+243], t$95$1, N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - z \cdot t\\
\mathbf{if}\;t \leq -4.1 \cdot 10^{+258}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{+92}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+243}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if t < -4.10000000000000008e258 or 5.5e88 < t < 6.2e243Initial program 100.0%
Taylor expanded in t around inf 95.6%
Taylor expanded in y around 0 74.3%
mul-1-neg74.3%
unsub-neg74.3%
Simplified74.3%
if -4.10000000000000008e258 < t < -1.04999999999999993e92Initial program 100.0%
Taylor expanded in t around inf 90.9%
Taylor expanded in z around 0 65.7%
if -1.04999999999999993e92 < t < 5.5e88Initial program 100.0%
Taylor expanded in x around inf 78.6%
mul-1-neg78.6%
unsub-neg78.6%
Simplified78.6%
if 6.2e243 < t Initial program 100.0%
Taylor expanded in y around inf 71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in x around -inf 64.8%
+-commutative64.8%
mul-1-neg64.8%
unsub-neg64.8%
sub-neg64.8%
metadata-eval64.8%
Simplified64.8%
Taylor expanded in y around inf 72.1%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -4.7e-66)
t_1
(if (<= z 7.6e-209) (* y t) (if (<= z 56000000.0) (* x (- y)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -4.7e-66) {
tmp = t_1;
} else if (z <= 7.6e-209) {
tmp = y * t;
} else if (z <= 56000000.0) {
tmp = x * -y;
} else {
tmp = t_1;
}
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 = z * -t
if (z <= (-4.7d-66)) then
tmp = t_1
else if (z <= 7.6d-209) then
tmp = y * t
else if (z <= 56000000.0d0) then
tmp = x * -y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -4.7e-66) {
tmp = t_1;
} else if (z <= 7.6e-209) {
tmp = y * t;
} else if (z <= 56000000.0) {
tmp = x * -y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -4.7e-66: tmp = t_1 elif z <= 7.6e-209: tmp = y * t elif z <= 56000000.0: tmp = x * -y else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -4.7e-66) tmp = t_1; elseif (z <= 7.6e-209) tmp = Float64(y * t); elseif (z <= 56000000.0) tmp = Float64(x * Float64(-y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; tmp = 0.0; if (z <= -4.7e-66) tmp = t_1; elseif (z <= 7.6e-209) tmp = y * t; elseif (z <= 56000000.0) tmp = x * -y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[z, -4.7e-66], t$95$1, If[LessEqual[z, 7.6e-209], N[(y * t), $MachinePrecision], If[LessEqual[z, 56000000.0], N[(x * (-y)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -4.7 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-209}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 56000000:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.6999999999999999e-66 or 5.6e7 < z Initial program 100.0%
Taylor expanded in t around inf 51.4%
Taylor expanded in y around 0 44.2%
mul-1-neg44.2%
unsub-neg44.2%
Simplified44.2%
Taylor expanded in x around 0 43.2%
associate-*r*43.2%
neg-mul-143.2%
Simplified43.2%
if -4.6999999999999999e-66 < z < 7.5999999999999998e-209Initial program 100.0%
Taylor expanded in t around inf 75.5%
Taylor expanded in z around 0 74.0%
Taylor expanded in x around 0 48.8%
if 7.5999999999999998e-209 < z < 5.6e7Initial program 100.0%
Taylor expanded in x around inf 77.7%
mul-1-neg77.7%
unsub-neg77.7%
Simplified77.7%
Taylor expanded in z around 0 72.8%
Taylor expanded in y around inf 45.6%
mul-1-neg45.6%
distribute-rgt-neg-out45.6%
Simplified45.6%
Final simplification45.3%
(FPCore (x y z t) :precision binary64 (if (or (<= t -6.9e+70) (not (<= t 2.7e-40))) (+ x (* (- y z) t)) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6.9e+70) || !(t <= 2.7e-40)) {
tmp = x + ((y - z) * t);
} else {
tmp = x * ((z - y) + 1.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 ((t <= (-6.9d+70)) .or. (.not. (t <= 2.7d-40))) then
tmp = x + ((y - z) * t)
else
tmp = x * ((z - y) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6.9e+70) || !(t <= 2.7e-40)) {
tmp = x + ((y - z) * t);
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -6.9e+70) or not (t <= 2.7e-40): tmp = x + ((y - z) * t) else: tmp = x * ((z - y) + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -6.9e+70) || !(t <= 2.7e-40)) tmp = Float64(x + Float64(Float64(y - z) * t)); else tmp = Float64(x * Float64(Float64(z - y) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -6.9e+70) || ~((t <= 2.7e-40))) tmp = x + ((y - z) * t); else tmp = x * ((z - y) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -6.9e+70], N[Not[LessEqual[t, 2.7e-40]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.9 \cdot 10^{+70} \lor \neg \left(t \leq 2.7 \cdot 10^{-40}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\end{array}
\end{array}
if t < -6.8999999999999995e70 or 2.7e-40 < t Initial program 100.0%
Taylor expanded in t around inf 84.4%
if -6.8999999999999995e70 < t < 2.7e-40Initial program 100.0%
Taylor expanded in x around inf 85.2%
mul-1-neg85.2%
unsub-neg85.2%
Simplified85.2%
Final simplification84.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -270.0) (not (<= z 1050000.0))) (+ x (* z (- x t))) (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -270.0) || !(z <= 1050000.0)) {
tmp = x + (z * (x - t));
} else {
tmp = x + (y * (t - x));
}
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 ((z <= (-270.0d0)) .or. (.not. (z <= 1050000.0d0))) then
tmp = x + (z * (x - t))
else
tmp = x + (y * (t - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -270.0) || !(z <= 1050000.0)) {
tmp = x + (z * (x - t));
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -270.0) or not (z <= 1050000.0): tmp = x + (z * (x - t)) else: tmp = x + (y * (t - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -270.0) || !(z <= 1050000.0)) tmp = Float64(x + Float64(z * Float64(x - t))); else tmp = Float64(x + Float64(y * Float64(t - x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -270.0) || ~((z <= 1050000.0))) tmp = x + (z * (x - t)); else tmp = x + (y * (t - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -270.0], N[Not[LessEqual[z, 1050000.0]], $MachinePrecision]], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -270 \lor \neg \left(z \leq 1050000\right):\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -270 or 1.05e6 < z Initial program 100.0%
sub-neg100.0%
distribute-lft-in94.4%
Applied egg-rr94.4%
Taylor expanded in y around 0 80.5%
+-commutative80.5%
associate-*r*80.5%
distribute-rgt-in85.3%
mul-1-neg85.3%
sub-neg85.3%
Simplified85.3%
if -270 < z < 1.05e6Initial program 100.0%
Taylor expanded in y around inf 93.5%
*-commutative93.5%
Simplified93.5%
Final simplification89.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.46e+72) (not (<= t 3.8e+65))) (* y t) (* x (- y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.46e+72) || !(t <= 3.8e+65)) {
tmp = y * t;
} else {
tmp = x * -y;
}
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.46d+72)) .or. (.not. (t <= 3.8d+65))) then
tmp = y * t
else
tmp = x * -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.46e+72) || !(t <= 3.8e+65)) {
tmp = y * t;
} else {
tmp = x * -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.46e+72) or not (t <= 3.8e+65): tmp = y * t else: tmp = x * -y return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.46e+72) || !(t <= 3.8e+65)) tmp = Float64(y * t); else tmp = Float64(x * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.46e+72) || ~((t <= 3.8e+65))) tmp = y * t; else tmp = x * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.46e+72], N[Not[LessEqual[t, 3.8e+65]], $MachinePrecision]], N[(y * t), $MachinePrecision], N[(x * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.46 \cdot 10^{+72} \lor \neg \left(t \leq 3.8 \cdot 10^{+65}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\end{array}
\end{array}
if t < -1.45999999999999999e72 or 3.80000000000000011e65 < t Initial program 100.0%
Taylor expanded in t around inf 91.1%
Taylor expanded in z around 0 53.0%
Taylor expanded in x around 0 46.4%
if -1.45999999999999999e72 < t < 3.80000000000000011e65Initial program 100.0%
Taylor expanded in x around inf 80.6%
mul-1-neg80.6%
unsub-neg80.6%
Simplified80.6%
Taylor expanded in z around 0 52.5%
Taylor expanded in y around inf 35.9%
mul-1-neg35.9%
distribute-rgt-neg-out35.9%
Simplified35.9%
Final simplification39.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7.5e-91) (not (<= y 1.12e-70))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7.5e-91) || !(y <= 1.12e-70)) {
tmp = y * t;
} else {
tmp = x;
}
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 <= (-7.5d-91)) .or. (.not. (y <= 1.12d-70))) then
tmp = y * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7.5e-91) || !(y <= 1.12e-70)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7.5e-91) or not (y <= 1.12e-70): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7.5e-91) || !(y <= 1.12e-70)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7.5e-91) || ~((y <= 1.12e-70))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7.5e-91], N[Not[LessEqual[y, 1.12e-70]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-91} \lor \neg \left(y \leq 1.12 \cdot 10^{-70}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.50000000000000051e-91 or 1.12e-70 < y Initial program 100.0%
Taylor expanded in t around inf 50.7%
Taylor expanded in z around 0 37.9%
Taylor expanded in x around 0 35.1%
if -7.50000000000000051e-91 < y < 1.12e-70Initial program 100.0%
Taylor expanded in t around inf 71.3%
Taylor expanded in x around inf 31.8%
Final simplification33.8%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 100.0%
Taylor expanded in t around inf 58.7%
Taylor expanded in x around inf 15.7%
Final simplification15.7%
(FPCore (x y z t) :precision binary64 (+ x (+ (* t (- y z)) (* (- x) (- y z)))))
double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
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)) + (-x * (y - z)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
def code(x, y, z, t): return x + ((t * (y - z)) + (-x * (y - z)))
function code(x, y, z, t) return Float64(x + Float64(Float64(t * Float64(y - z)) + Float64(Float64(-x) * Float64(y - z)))) end
function tmp = code(x, y, z, t) tmp = x + ((t * (y - z)) + (-x * (y - z))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] + N[((-x) * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t \cdot \left(y - z\right) + \left(-x\right) \cdot \left(y - z\right)\right)
\end{array}
herbie shell --seed 2024034
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:herbie-target
(+ x (+ (* t (- y z)) (* (- x) (- y z))))
(+ x (* (- y z) (- t x))))