
(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 14 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 (fma (- y z) (- t x) x))
double code(double x, double y, double z, double t) {
return fma((y - z), (t - x), x);
}
function code(x, y, z, t) return fma(Float64(y - z), Float64(t - x), x) end
code[x_, y_, z_, t_] := N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - z, t - x, x\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))) (t_2 (+ x (* y (- t x)))))
(if (<= z -6.8e+121)
t_1
(if (<= z -5.7e+88)
t_2
(if (<= z -2e+39)
t_1
(if (<= z 5.5e-180)
t_2
(if (<= z 2.7e-69)
(- x (* t (- z y)))
(if (<= z 4.2e+51) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double t_2 = x + (y * (t - x));
double tmp;
if (z <= -6.8e+121) {
tmp = t_1;
} else if (z <= -5.7e+88) {
tmp = t_2;
} else if (z <= -2e+39) {
tmp = t_1;
} else if (z <= 5.5e-180) {
tmp = t_2;
} else if (z <= 2.7e-69) {
tmp = x - (t * (z - y));
} else if (z <= 4.2e+51) {
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 = z * (x - t)
t_2 = x + (y * (t - x))
if (z <= (-6.8d+121)) then
tmp = t_1
else if (z <= (-5.7d+88)) then
tmp = t_2
else if (z <= (-2d+39)) then
tmp = t_1
else if (z <= 5.5d-180) then
tmp = t_2
else if (z <= 2.7d-69) then
tmp = x - (t * (z - y))
else if (z <= 4.2d+51) 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 = z * (x - t);
double t_2 = x + (y * (t - x));
double tmp;
if (z <= -6.8e+121) {
tmp = t_1;
} else if (z <= -5.7e+88) {
tmp = t_2;
} else if (z <= -2e+39) {
tmp = t_1;
} else if (z <= 5.5e-180) {
tmp = t_2;
} else if (z <= 2.7e-69) {
tmp = x - (t * (z - y));
} else if (z <= 4.2e+51) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) t_2 = x + (y * (t - x)) tmp = 0 if z <= -6.8e+121: tmp = t_1 elif z <= -5.7e+88: tmp = t_2 elif z <= -2e+39: tmp = t_1 elif z <= 5.5e-180: tmp = t_2 elif z <= 2.7e-69: tmp = x - (t * (z - y)) elif z <= 4.2e+51: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) t_2 = Float64(x + Float64(y * Float64(t - x))) tmp = 0.0 if (z <= -6.8e+121) tmp = t_1; elseif (z <= -5.7e+88) tmp = t_2; elseif (z <= -2e+39) tmp = t_1; elseif (z <= 5.5e-180) tmp = t_2; elseif (z <= 2.7e-69) tmp = Float64(x - Float64(t * Float64(z - y))); elseif (z <= 4.2e+51) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); t_2 = x + (y * (t - x)); tmp = 0.0; if (z <= -6.8e+121) tmp = t_1; elseif (z <= -5.7e+88) tmp = t_2; elseif (z <= -2e+39) tmp = t_1; elseif (z <= 5.5e-180) tmp = t_2; elseif (z <= 2.7e-69) tmp = x - (t * (z - y)); elseif (z <= 4.2e+51) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+121], t$95$1, If[LessEqual[z, -5.7e+88], t$95$2, If[LessEqual[z, -2e+39], t$95$1, If[LessEqual[z, 5.5e-180], t$95$2, If[LessEqual[z, 2.7e-69], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+51], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := x + y \cdot \left(t - x\right)\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+121}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.7 \cdot 10^{+88}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-180}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-69}:\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+51}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.80000000000000021e121 or -5.70000000000000021e88 < z < -1.99999999999999988e39 or 4.2000000000000002e51 < z Initial program 100.0%
Taylor expanded in y around 0 91.6%
mul-1-neg91.6%
unsub-neg91.6%
Simplified91.6%
Taylor expanded in z around inf 91.6%
if -6.80000000000000021e121 < z < -5.70000000000000021e88 or -1.99999999999999988e39 < z < 5.50000000000000011e-180 or 2.6999999999999997e-69 < z < 4.2000000000000002e51Initial program 100.0%
Taylor expanded in y around inf 84.9%
*-commutative84.9%
Simplified84.9%
if 5.50000000000000011e-180 < z < 2.6999999999999997e-69Initial program 100.0%
Taylor expanded in t around inf 100.0%
Final simplification89.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- x))) (t_2 (- (* z t))))
(if (<= z -5.6e+59)
t_2
(if (<= z -1.0)
(* z x)
(if (<= z -1.15e-259)
x
(if (<= z 7.5e-179)
t_1
(if (<= z 9.5e-44)
x
(if (<= z 4e+101) t_1 (if (<= z 2.8e+237) t_2 (* z x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double t_2 = -(z * t);
double tmp;
if (z <= -5.6e+59) {
tmp = t_2;
} else if (z <= -1.0) {
tmp = z * x;
} else if (z <= -1.15e-259) {
tmp = x;
} else if (z <= 7.5e-179) {
tmp = t_1;
} else if (z <= 9.5e-44) {
tmp = x;
} else if (z <= 4e+101) {
tmp = t_1;
} else if (z <= 2.8e+237) {
tmp = t_2;
} else {
tmp = z * 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) :: t_2
real(8) :: tmp
t_1 = y * -x
t_2 = -(z * t)
if (z <= (-5.6d+59)) then
tmp = t_2
else if (z <= (-1.0d0)) then
tmp = z * x
else if (z <= (-1.15d-259)) then
tmp = x
else if (z <= 7.5d-179) then
tmp = t_1
else if (z <= 9.5d-44) then
tmp = x
else if (z <= 4d+101) then
tmp = t_1
else if (z <= 2.8d+237) then
tmp = t_2
else
tmp = z * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double t_2 = -(z * t);
double tmp;
if (z <= -5.6e+59) {
tmp = t_2;
} else if (z <= -1.0) {
tmp = z * x;
} else if (z <= -1.15e-259) {
tmp = x;
} else if (z <= 7.5e-179) {
tmp = t_1;
} else if (z <= 9.5e-44) {
tmp = x;
} else if (z <= 4e+101) {
tmp = t_1;
} else if (z <= 2.8e+237) {
tmp = t_2;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * -x t_2 = -(z * t) tmp = 0 if z <= -5.6e+59: tmp = t_2 elif z <= -1.0: tmp = z * x elif z <= -1.15e-259: tmp = x elif z <= 7.5e-179: tmp = t_1 elif z <= 9.5e-44: tmp = x elif z <= 4e+101: tmp = t_1 elif z <= 2.8e+237: tmp = t_2 else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-x)) t_2 = Float64(-Float64(z * t)) tmp = 0.0 if (z <= -5.6e+59) tmp = t_2; elseif (z <= -1.0) tmp = Float64(z * x); elseif (z <= -1.15e-259) tmp = x; elseif (z <= 7.5e-179) tmp = t_1; elseif (z <= 9.5e-44) tmp = x; elseif (z <= 4e+101) tmp = t_1; elseif (z <= 2.8e+237) tmp = t_2; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * -x; t_2 = -(z * t); tmp = 0.0; if (z <= -5.6e+59) tmp = t_2; elseif (z <= -1.0) tmp = z * x; elseif (z <= -1.15e-259) tmp = x; elseif (z <= 7.5e-179) tmp = t_1; elseif (z <= 9.5e-44) tmp = x; elseif (z <= 4e+101) tmp = t_1; elseif (z <= 2.8e+237) tmp = t_2; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, Block[{t$95$2 = (-N[(z * t), $MachinePrecision])}, If[LessEqual[z, -5.6e+59], t$95$2, If[LessEqual[z, -1.0], N[(z * x), $MachinePrecision], If[LessEqual[z, -1.15e-259], x, If[LessEqual[z, 7.5e-179], t$95$1, If[LessEqual[z, 9.5e-44], x, If[LessEqual[z, 4e+101], t$95$1, If[LessEqual[z, 2.8e+237], t$95$2, N[(z * x), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-x\right)\\
t_2 := -z \cdot t\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{+59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-259}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-179}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-44}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+237}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -5.5999999999999996e59 or 3.9999999999999999e101 < z < 2.79999999999999983e237Initial program 100.0%
Taylor expanded in y around 0 87.6%
mul-1-neg87.6%
unsub-neg87.6%
Simplified87.6%
Taylor expanded in x around 0 62.4%
associate-*r*62.4%
neg-mul-162.4%
Simplified62.4%
if -5.5999999999999996e59 < z < -1 or 2.79999999999999983e237 < z Initial program 100.0%
Taylor expanded in x around inf 73.1%
mul-1-neg73.1%
unsub-neg73.1%
distribute-lft-out--73.1%
*-rgt-identity73.1%
Simplified73.1%
Taylor expanded in z around inf 57.7%
if -1 < z < -1.15e-259 or 7.4999999999999996e-179 < z < 9.49999999999999924e-44Initial program 100.0%
Taylor expanded in t around inf 86.4%
Taylor expanded in x around inf 45.0%
if -1.15e-259 < z < 7.4999999999999996e-179 or 9.49999999999999924e-44 < z < 3.9999999999999999e101Initial program 100.0%
Taylor expanded in x around inf 68.9%
mul-1-neg68.9%
unsub-neg68.9%
distribute-lft-out--68.9%
*-rgt-identity68.9%
Simplified68.9%
Taylor expanded in y around inf 45.5%
mul-1-neg45.5%
distribute-rgt-neg-in45.5%
Simplified45.5%
Final simplification52.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- x))) (t_2 (* z (- x t))) (t_3 (* x (+ z 1.0))))
(if (<= z -130000.0)
t_2
(if (<= z -5.6e-260)
t_3
(if (<= z 4.7e-179)
t_1
(if (<= z 3.9e-42) t_3 (if (<= z 9e+32) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double t_2 = z * (x - t);
double t_3 = x * (z + 1.0);
double tmp;
if (z <= -130000.0) {
tmp = t_2;
} else if (z <= -5.6e-260) {
tmp = t_3;
} else if (z <= 4.7e-179) {
tmp = t_1;
} else if (z <= 3.9e-42) {
tmp = t_3;
} else if (z <= 9e+32) {
tmp = t_1;
} 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 = y * -x
t_2 = z * (x - t)
t_3 = x * (z + 1.0d0)
if (z <= (-130000.0d0)) then
tmp = t_2
else if (z <= (-5.6d-260)) then
tmp = t_3
else if (z <= 4.7d-179) then
tmp = t_1
else if (z <= 3.9d-42) then
tmp = t_3
else if (z <= 9d+32) then
tmp = t_1
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 = y * -x;
double t_2 = z * (x - t);
double t_3 = x * (z + 1.0);
double tmp;
if (z <= -130000.0) {
tmp = t_2;
} else if (z <= -5.6e-260) {
tmp = t_3;
} else if (z <= 4.7e-179) {
tmp = t_1;
} else if (z <= 3.9e-42) {
tmp = t_3;
} else if (z <= 9e+32) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * -x t_2 = z * (x - t) t_3 = x * (z + 1.0) tmp = 0 if z <= -130000.0: tmp = t_2 elif z <= -5.6e-260: tmp = t_3 elif z <= 4.7e-179: tmp = t_1 elif z <= 3.9e-42: tmp = t_3 elif z <= 9e+32: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-x)) t_2 = Float64(z * Float64(x - t)) t_3 = Float64(x * Float64(z + 1.0)) tmp = 0.0 if (z <= -130000.0) tmp = t_2; elseif (z <= -5.6e-260) tmp = t_3; elseif (z <= 4.7e-179) tmp = t_1; elseif (z <= 3.9e-42) tmp = t_3; elseif (z <= 9e+32) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * -x; t_2 = z * (x - t); t_3 = x * (z + 1.0); tmp = 0.0; if (z <= -130000.0) tmp = t_2; elseif (z <= -5.6e-260) tmp = t_3; elseif (z <= 4.7e-179) tmp = t_1; elseif (z <= 3.9e-42) tmp = t_3; elseif (z <= 9e+32) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -130000.0], t$95$2, If[LessEqual[z, -5.6e-260], t$95$3, If[LessEqual[z, 4.7e-179], t$95$1, If[LessEqual[z, 3.9e-42], t$95$3, If[LessEqual[z, 9e+32], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-x\right)\\
t_2 := z \cdot \left(x - t\right)\\
t_3 := x \cdot \left(z + 1\right)\\
\mathbf{if}\;z \leq -130000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-260}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-179}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-42}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.3e5 or 9.0000000000000007e32 < z Initial program 100.0%
Taylor expanded in y around 0 82.8%
mul-1-neg82.8%
unsub-neg82.8%
Simplified82.8%
Taylor expanded in z around inf 82.7%
if -1.3e5 < z < -5.5999999999999996e-260 or 4.7000000000000003e-179 < z < 3.9000000000000002e-42Initial program 100.0%
Taylor expanded in x around -inf 63.3%
mul-1-neg63.3%
*-commutative63.3%
distribute-rgt-neg-in63.3%
+-commutative63.3%
Simplified63.3%
Taylor expanded in y around 0 47.2%
if -5.5999999999999996e-260 < z < 4.7000000000000003e-179 or 3.9000000000000002e-42 < z < 9.0000000000000007e32Initial program 99.9%
Taylor expanded in x around inf 68.7%
mul-1-neg68.7%
unsub-neg68.7%
distribute-lft-out--68.6%
*-rgt-identity68.6%
Simplified68.6%
Taylor expanded in y around inf 47.3%
mul-1-neg47.3%
distribute-rgt-neg-in47.3%
Simplified47.3%
Final simplification64.3%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.0)
(* z x)
(if (<= z -1.65e-270)
x
(if (<= z 4.1e-178) (* y t) (if (<= z 1.3e-14) x (* z x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = z * x;
} else if (z <= -1.65e-270) {
tmp = x;
} else if (z <= 4.1e-178) {
tmp = y * t;
} else if (z <= 1.3e-14) {
tmp = x;
} else {
tmp = z * 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 <= (-1.0d0)) then
tmp = z * x
else if (z <= (-1.65d-270)) then
tmp = x
else if (z <= 4.1d-178) then
tmp = y * t
else if (z <= 1.3d-14) then
tmp = x
else
tmp = z * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.0) {
tmp = z * x;
} else if (z <= -1.65e-270) {
tmp = x;
} else if (z <= 4.1e-178) {
tmp = y * t;
} else if (z <= 1.3e-14) {
tmp = x;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.0: tmp = z * x elif z <= -1.65e-270: tmp = x elif z <= 4.1e-178: tmp = y * t elif z <= 1.3e-14: tmp = x else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.0) tmp = Float64(z * x); elseif (z <= -1.65e-270) tmp = x; elseif (z <= 4.1e-178) tmp = Float64(y * t); elseif (z <= 1.3e-14) tmp = x; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.0) tmp = z * x; elseif (z <= -1.65e-270) tmp = x; elseif (z <= 4.1e-178) tmp = y * t; elseif (z <= 1.3e-14) tmp = x; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.0], N[(z * x), $MachinePrecision], If[LessEqual[z, -1.65e-270], x, If[LessEqual[z, 4.1e-178], N[(y * t), $MachinePrecision], If[LessEqual[z, 1.3e-14], x, N[(z * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-270}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-178}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -1 or 1.29999999999999998e-14 < z Initial program 100.0%
Taylor expanded in x around inf 52.8%
mul-1-neg52.8%
unsub-neg52.8%
distribute-lft-out--52.8%
*-rgt-identity52.8%
Simplified52.8%
Taylor expanded in z around inf 38.3%
if -1 < z < -1.65000000000000009e-270 or 4.0999999999999999e-178 < z < 1.29999999999999998e-14Initial program 100.0%
Taylor expanded in t around inf 80.2%
Taylor expanded in x around inf 42.5%
if -1.65000000000000009e-270 < z < 4.0999999999999999e-178Initial program 100.0%
Taylor expanded in t around inf 70.5%
Taylor expanded in y around 0 70.5%
associate-+r+70.5%
mul-1-neg70.5%
*-commutative70.5%
sub-neg70.5%
associate-+l-70.5%
Applied egg-rr70.5%
Taylor expanded in y around inf 39.6%
Final simplification39.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -4.0)
t_1
(if (<= z 2.8e-42) (+ x (* y t)) (if (<= z 5.9e+32) (* y (- x)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -4.0) {
tmp = t_1;
} else if (z <= 2.8e-42) {
tmp = x + (y * t);
} else if (z <= 5.9e+32) {
tmp = y * -x;
} 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 * (x - t)
if (z <= (-4.0d0)) then
tmp = t_1
else if (z <= 2.8d-42) then
tmp = x + (y * t)
else if (z <= 5.9d+32) then
tmp = 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 t_1 = z * (x - t);
double tmp;
if (z <= -4.0) {
tmp = t_1;
} else if (z <= 2.8e-42) {
tmp = x + (y * t);
} else if (z <= 5.9e+32) {
tmp = y * -x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -4.0: tmp = t_1 elif z <= 2.8e-42: tmp = x + (y * t) elif z <= 5.9e+32: tmp = y * -x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -4.0) tmp = t_1; elseif (z <= 2.8e-42) tmp = Float64(x + Float64(y * t)); elseif (z <= 5.9e+32) tmp = Float64(y * Float64(-x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); tmp = 0.0; if (z <= -4.0) tmp = t_1; elseif (z <= 2.8e-42) tmp = x + (y * t); elseif (z <= 5.9e+32) tmp = y * -x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.0], t$95$1, If[LessEqual[z, 2.8e-42], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.9e+32], N[(y * (-x)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -4:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-42}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 5.9 \cdot 10^{+32}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4 or 5.89999999999999965e32 < z Initial program 100.0%
Taylor expanded in y around 0 83.2%
mul-1-neg83.2%
unsub-neg83.2%
Simplified83.2%
Taylor expanded in z around inf 81.5%
if -4 < z < 2.79999999999999998e-42Initial program 100.0%
Taylor expanded in t around inf 80.2%
Taylor expanded in y around inf 69.0%
*-commutative69.0%
Simplified69.0%
if 2.79999999999999998e-42 < z < 5.89999999999999965e32Initial program 99.8%
Taylor expanded in x around inf 72.0%
mul-1-neg72.0%
unsub-neg72.0%
distribute-lft-out--71.9%
*-rgt-identity71.9%
Simplified71.9%
Taylor expanded in y around inf 59.1%
mul-1-neg59.1%
distribute-rgt-neg-in59.1%
Simplified59.1%
Final simplification74.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -6e+36) (not (<= z 4.3e+52))) (* z (- x t)) (- x (* t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6e+36) || !(z <= 4.3e+52)) {
tmp = z * (x - t);
} else {
tmp = x - (t * (z - 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 ((z <= (-6d+36)) .or. (.not. (z <= 4.3d+52))) then
tmp = z * (x - t)
else
tmp = x - (t * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6e+36) || !(z <= 4.3e+52)) {
tmp = z * (x - t);
} else {
tmp = x - (t * (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6e+36) or not (z <= 4.3e+52): tmp = z * (x - t) else: tmp = x - (t * (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6e+36) || !(z <= 4.3e+52)) tmp = Float64(z * Float64(x - t)); else tmp = Float64(x - Float64(t * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6e+36) || ~((z <= 4.3e+52))) tmp = z * (x - t); else tmp = x - (t * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6e+36], N[Not[LessEqual[z, 4.3e+52]], $MachinePrecision]], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+36} \lor \neg \left(z \leq 4.3 \cdot 10^{+52}\right):\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\end{array}
\end{array}
if z < -6e36 or 4.3e52 < z Initial program 100.0%
Taylor expanded in y around 0 86.2%
mul-1-neg86.2%
unsub-neg86.2%
Simplified86.2%
Taylor expanded in z around inf 86.2%
if -6e36 < z < 4.3e52Initial program 100.0%
Taylor expanded in t around inf 73.0%
Final simplification78.8%
(FPCore (x y z t) :precision binary64 (if (or (<= t -6.5e-46) (not (<= t 2e+74))) (- x (* t (- z y))) (+ x (* x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6.5e-46) || !(t <= 2e+74)) {
tmp = x - (t * (z - y));
} else {
tmp = x + (x * (z - 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 <= (-6.5d-46)) .or. (.not. (t <= 2d+74))) then
tmp = x - (t * (z - y))
else
tmp = x + (x * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6.5e-46) || !(t <= 2e+74)) {
tmp = x - (t * (z - y));
} else {
tmp = x + (x * (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -6.5e-46) or not (t <= 2e+74): tmp = x - (t * (z - y)) else: tmp = x + (x * (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -6.5e-46) || !(t <= 2e+74)) tmp = Float64(x - Float64(t * Float64(z - y))); else tmp = Float64(x + Float64(x * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -6.5e-46) || ~((t <= 2e+74))) tmp = x - (t * (z - y)); else tmp = x + (x * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -6.5e-46], N[Not[LessEqual[t, 2e+74]], $MachinePrecision]], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-46} \lor \neg \left(t \leq 2 \cdot 10^{+74}\right):\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(z - y\right)\\
\end{array}
\end{array}
if t < -6.49999999999999966e-46 or 1.9999999999999999e74 < t Initial program 100.0%
Taylor expanded in t around inf 92.0%
if -6.49999999999999966e-46 < t < 1.9999999999999999e74Initial program 100.0%
Taylor expanded in x around inf 80.9%
mul-1-neg80.9%
unsub-neg80.9%
distribute-lft-out--80.9%
*-rgt-identity80.9%
Simplified80.9%
Final simplification86.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.85e-45) (not (<= t 3.35e+75))) (- x (* t (- z y))) (* x (- (+ z 1.0) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.85e-45) || !(t <= 3.35e+75)) {
tmp = x - (t * (z - y));
} else {
tmp = x * ((z + 1.0) - 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.85d-45)) .or. (.not. (t <= 3.35d+75))) then
tmp = x - (t * (z - y))
else
tmp = x * ((z + 1.0d0) - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.85e-45) || !(t <= 3.35e+75)) {
tmp = x - (t * (z - y));
} else {
tmp = x * ((z + 1.0) - y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.85e-45) or not (t <= 3.35e+75): tmp = x - (t * (z - y)) else: tmp = x * ((z + 1.0) - y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.85e-45) || !(t <= 3.35e+75)) tmp = Float64(x - Float64(t * Float64(z - y))); else tmp = Float64(x * Float64(Float64(z + 1.0) - y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.85e-45) || ~((t <= 3.35e+75))) tmp = x - (t * (z - y)); else tmp = x * ((z + 1.0) - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.85e-45], N[Not[LessEqual[t, 3.35e+75]], $MachinePrecision]], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z + 1.0), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{-45} \lor \neg \left(t \leq 3.35 \cdot 10^{+75}\right):\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z + 1\right) - y\right)\\
\end{array}
\end{array}
if t < -1.85e-45 or 3.35e75 < t Initial program 100.0%
Taylor expanded in t around inf 92.0%
if -1.85e-45 < t < 3.35e75Initial program 100.0%
Taylor expanded in x around -inf 80.9%
mul-1-neg80.9%
*-commutative80.9%
distribute-rgt-neg-in80.9%
+-commutative80.9%
Simplified80.9%
Final simplification86.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- x))))
(if (<= y -1950000.0)
t_1
(if (<= y 6.5e-45) x (if (<= y 4.7e+111) (* y t) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double tmp;
if (y <= -1950000.0) {
tmp = t_1;
} else if (y <= 6.5e-45) {
tmp = x;
} else if (y <= 4.7e+111) {
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 = y * -x
if (y <= (-1950000.0d0)) then
tmp = t_1
else if (y <= 6.5d-45) then
tmp = x
else if (y <= 4.7d+111) 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 = y * -x;
double tmp;
if (y <= -1950000.0) {
tmp = t_1;
} else if (y <= 6.5e-45) {
tmp = x;
} else if (y <= 4.7e+111) {
tmp = y * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * -x tmp = 0 if y <= -1950000.0: tmp = t_1 elif y <= 6.5e-45: tmp = x elif y <= 4.7e+111: tmp = y * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-x)) tmp = 0.0 if (y <= -1950000.0) tmp = t_1; elseif (y <= 6.5e-45) tmp = x; elseif (y <= 4.7e+111) tmp = Float64(y * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * -x; tmp = 0.0; if (y <= -1950000.0) tmp = t_1; elseif (y <= 6.5e-45) tmp = x; elseif (y <= 4.7e+111) tmp = y * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[y, -1950000.0], t$95$1, If[LessEqual[y, 6.5e-45], x, If[LessEqual[y, 4.7e+111], N[(y * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-x\right)\\
\mathbf{if}\;y \leq -1950000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-45}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{+111}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.95e6 or 4.70000000000000008e111 < y Initial program 100.0%
Taylor expanded in x around inf 60.2%
mul-1-neg60.2%
unsub-neg60.2%
distribute-lft-out--60.2%
*-rgt-identity60.2%
Simplified60.2%
Taylor expanded in y around inf 53.2%
mul-1-neg53.2%
distribute-rgt-neg-in53.2%
Simplified53.2%
if -1.95e6 < y < 6.4999999999999995e-45Initial program 100.0%
Taylor expanded in t around inf 77.8%
Taylor expanded in x around inf 35.7%
if 6.4999999999999995e-45 < y < 4.70000000000000008e111Initial program 100.0%
Taylor expanded in t around inf 62.4%
Taylor expanded in y around 0 62.4%
associate-+r+62.4%
mul-1-neg62.4%
*-commutative62.4%
sub-neg62.4%
associate-+l-62.4%
Applied egg-rr62.4%
Taylor expanded in y around inf 37.7%
Final simplification42.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.2e+41) (not (<= y 9.5e+30))) (* y (- x)) (* x (+ z 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e+41) || !(y <= 9.5e+30)) {
tmp = y * -x;
} else {
tmp = x * (z + 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 ((y <= (-6.2d+41)) .or. (.not. (y <= 9.5d+30))) then
tmp = y * -x
else
tmp = x * (z + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e+41) || !(y <= 9.5e+30)) {
tmp = y * -x;
} else {
tmp = x * (z + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.2e+41) or not (y <= 9.5e+30): tmp = y * -x else: tmp = x * (z + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.2e+41) || !(y <= 9.5e+30)) tmp = Float64(y * Float64(-x)); else tmp = Float64(x * Float64(z + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.2e+41) || ~((y <= 9.5e+30))) tmp = y * -x; else tmp = x * (z + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.2e+41], N[Not[LessEqual[y, 9.5e+30]], $MachinePrecision]], N[(y * (-x)), $MachinePrecision], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+41} \lor \neg \left(y \leq 9.5 \cdot 10^{+30}\right):\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\end{array}
\end{array}
if y < -6.2e41 or 9.5000000000000003e30 < y Initial program 100.0%
Taylor expanded in x around inf 56.4%
mul-1-neg56.4%
unsub-neg56.4%
distribute-lft-out--56.4%
*-rgt-identity56.4%
Simplified56.4%
Taylor expanded in y around inf 51.6%
mul-1-neg51.6%
distribute-rgt-neg-in51.6%
Simplified51.6%
if -6.2e41 < y < 9.5000000000000003e30Initial program 100.0%
Taylor expanded in x around -inf 59.6%
mul-1-neg59.6%
*-commutative59.6%
distribute-rgt-neg-in59.6%
+-commutative59.6%
Simplified59.6%
Taylor expanded in y around 0 58.0%
Final simplification55.4%
(FPCore (x y z t) :precision binary64 (+ x (* (- x t) (- z y))))
double code(double x, double y, double z, double t) {
return x + ((x - t) * (z - y));
}
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 + ((x - t) * (z - y))
end function
public static double code(double x, double y, double z, double t) {
return x + ((x - t) * (z - y));
}
def code(x, y, z, t): return x + ((x - t) * (z - y))
function code(x, y, z, t) return Float64(x + Float64(Float64(x - t) * Float64(z - y))) end
function tmp = code(x, y, z, t) tmp = x + ((x - t) * (z - y)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(x - t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(x - t\right) \cdot \left(z - y\right)
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y z t) :precision binary64 (if (<= y -1.3e-23) (* y t) (if (<= y 9e-45) x (* y t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e-23) {
tmp = y * t;
} else if (y <= 9e-45) {
tmp = x;
} else {
tmp = 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 (y <= (-1.3d-23)) then
tmp = y * t
else if (y <= 9d-45) then
tmp = x
else
tmp = y * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.3e-23) {
tmp = y * t;
} else if (y <= 9e-45) {
tmp = x;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.3e-23: tmp = y * t elif y <= 9e-45: tmp = x else: tmp = y * t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.3e-23) tmp = Float64(y * t); elseif (y <= 9e-45) tmp = x; else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.3e-23) tmp = y * t; elseif (y <= 9e-45) tmp = x; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.3e-23], N[(y * t), $MachinePrecision], If[LessEqual[y, 9e-45], x, N[(y * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{-23}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-45}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -1.3e-23 or 8.9999999999999997e-45 < y Initial program 100.0%
Taylor expanded in t around inf 54.4%
Taylor expanded in y around 0 48.4%
associate-+r+48.4%
mul-1-neg48.4%
*-commutative48.4%
sub-neg48.4%
associate-+l-48.4%
Applied egg-rr48.4%
Taylor expanded in y around inf 36.5%
if -1.3e-23 < y < 8.9999999999999997e-45Initial program 100.0%
Taylor expanded in t around inf 77.2%
Taylor expanded in x around inf 36.5%
Final simplification36.5%
(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 65.4%
Taylor expanded in x around inf 19.5%
Final simplification19.5%
(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 2023287
(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))))