
(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 13 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
(if (<= z -4.3e+88)
(* z x)
(if (<= z -1.75e-37)
(* y t)
(if (<= z -1.35e-124)
x
(if (<= z -2.35e-228)
(* y t)
(if (<= z -4.4e-292)
x
(if (<= z 1.2e-26)
(* y t)
(if (or (<= z 6e+116) (not (<= z 1.48e+153)))
(* z x)
(* z (- t))))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.3e+88) {
tmp = z * x;
} else if (z <= -1.75e-37) {
tmp = y * t;
} else if (z <= -1.35e-124) {
tmp = x;
} else if (z <= -2.35e-228) {
tmp = y * t;
} else if (z <= -4.4e-292) {
tmp = x;
} else if (z <= 1.2e-26) {
tmp = y * t;
} else if ((z <= 6e+116) || !(z <= 1.48e+153)) {
tmp = z * x;
} else {
tmp = z * -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 (z <= (-4.3d+88)) then
tmp = z * x
else if (z <= (-1.75d-37)) then
tmp = y * t
else if (z <= (-1.35d-124)) then
tmp = x
else if (z <= (-2.35d-228)) then
tmp = y * t
else if (z <= (-4.4d-292)) then
tmp = x
else if (z <= 1.2d-26) then
tmp = y * t
else if ((z <= 6d+116) .or. (.not. (z <= 1.48d+153))) then
tmp = z * x
else
tmp = z * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.3e+88) {
tmp = z * x;
} else if (z <= -1.75e-37) {
tmp = y * t;
} else if (z <= -1.35e-124) {
tmp = x;
} else if (z <= -2.35e-228) {
tmp = y * t;
} else if (z <= -4.4e-292) {
tmp = x;
} else if (z <= 1.2e-26) {
tmp = y * t;
} else if ((z <= 6e+116) || !(z <= 1.48e+153)) {
tmp = z * x;
} else {
tmp = z * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.3e+88: tmp = z * x elif z <= -1.75e-37: tmp = y * t elif z <= -1.35e-124: tmp = x elif z <= -2.35e-228: tmp = y * t elif z <= -4.4e-292: tmp = x elif z <= 1.2e-26: tmp = y * t elif (z <= 6e+116) or not (z <= 1.48e+153): tmp = z * x else: tmp = z * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.3e+88) tmp = Float64(z * x); elseif (z <= -1.75e-37) tmp = Float64(y * t); elseif (z <= -1.35e-124) tmp = x; elseif (z <= -2.35e-228) tmp = Float64(y * t); elseif (z <= -4.4e-292) tmp = x; elseif (z <= 1.2e-26) tmp = Float64(y * t); elseif ((z <= 6e+116) || !(z <= 1.48e+153)) tmp = Float64(z * x); else tmp = Float64(z * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4.3e+88) tmp = z * x; elseif (z <= -1.75e-37) tmp = y * t; elseif (z <= -1.35e-124) tmp = x; elseif (z <= -2.35e-228) tmp = y * t; elseif (z <= -4.4e-292) tmp = x; elseif (z <= 1.2e-26) tmp = y * t; elseif ((z <= 6e+116) || ~((z <= 1.48e+153))) tmp = z * x; else tmp = z * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.3e+88], N[(z * x), $MachinePrecision], If[LessEqual[z, -1.75e-37], N[(y * t), $MachinePrecision], If[LessEqual[z, -1.35e-124], x, If[LessEqual[z, -2.35e-228], N[(y * t), $MachinePrecision], If[LessEqual[z, -4.4e-292], x, If[LessEqual[z, 1.2e-26], N[(y * t), $MachinePrecision], If[Or[LessEqual[z, 6e+116], N[Not[LessEqual[z, 1.48e+153]], $MachinePrecision]], N[(z * x), $MachinePrecision], N[(z * (-t)), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+88}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -1.75 \cdot 10^{-37}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-124}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{-228}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-292}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-26}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+116} \lor \neg \left(z \leq 1.48 \cdot 10^{+153}\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -4.29999999999999974e88 or 1.2e-26 < z < 5.9999999999999997e116 or 1.47999999999999998e153 < z Initial program 100.0%
Taylor expanded in t around 0 63.4%
mul-1-neg63.4%
distribute-rgt-neg-in63.4%
neg-sub063.4%
sub-neg63.4%
+-commutative63.4%
associate--r+63.4%
neg-sub063.4%
remove-double-neg63.4%
Simplified63.4%
Taylor expanded in z around inf 53.2%
*-commutative53.2%
Simplified53.2%
if -4.29999999999999974e88 < z < -1.7500000000000001e-37 or -1.35000000000000009e-124 < z < -2.3500000000000001e-228 or -4.40000000000000023e-292 < z < 1.2e-26Initial program 100.0%
Taylor expanded in t around inf 76.7%
+-commutative76.7%
*-commutative76.7%
fma-def76.8%
Applied egg-rr76.8%
Taylor expanded in y around inf 48.2%
if -1.7500000000000001e-37 < z < -1.35000000000000009e-124 or -2.3500000000000001e-228 < z < -4.40000000000000023e-292Initial program 100.0%
Taylor expanded in t around inf 85.2%
Taylor expanded in x around inf 53.0%
if 5.9999999999999997e116 < z < 1.47999999999999998e153Initial program 100.0%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
*-commutative100.0%
fma-def100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 85.8%
associate-*r*85.8%
mul-1-neg85.8%
Simplified85.8%
Final simplification51.8%
(FPCore (x y z t)
:precision binary64
(if (<= z -4.3e+88)
(* z x)
(if (<= z -1.02e-38)
(* y t)
(if (<= z -3.7e-121)
x
(if (<= z -2.1e-228)
(* y t)
(if (<= z -1.4e-289) x (if (<= z 1.2e-26) (* y t) (* z x))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.3e+88) {
tmp = z * x;
} else if (z <= -1.02e-38) {
tmp = y * t;
} else if (z <= -3.7e-121) {
tmp = x;
} else if (z <= -2.1e-228) {
tmp = y * t;
} else if (z <= -1.4e-289) {
tmp = x;
} else if (z <= 1.2e-26) {
tmp = y * t;
} 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 <= (-4.3d+88)) then
tmp = z * x
else if (z <= (-1.02d-38)) then
tmp = y * t
else if (z <= (-3.7d-121)) then
tmp = x
else if (z <= (-2.1d-228)) then
tmp = y * t
else if (z <= (-1.4d-289)) then
tmp = x
else if (z <= 1.2d-26) then
tmp = y * t
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 <= -4.3e+88) {
tmp = z * x;
} else if (z <= -1.02e-38) {
tmp = y * t;
} else if (z <= -3.7e-121) {
tmp = x;
} else if (z <= -2.1e-228) {
tmp = y * t;
} else if (z <= -1.4e-289) {
tmp = x;
} else if (z <= 1.2e-26) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.3e+88: tmp = z * x elif z <= -1.02e-38: tmp = y * t elif z <= -3.7e-121: tmp = x elif z <= -2.1e-228: tmp = y * t elif z <= -1.4e-289: tmp = x elif z <= 1.2e-26: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.3e+88) tmp = Float64(z * x); elseif (z <= -1.02e-38) tmp = Float64(y * t); elseif (z <= -3.7e-121) tmp = x; elseif (z <= -2.1e-228) tmp = Float64(y * t); elseif (z <= -1.4e-289) tmp = x; elseif (z <= 1.2e-26) tmp = Float64(y * t); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4.3e+88) tmp = z * x; elseif (z <= -1.02e-38) tmp = y * t; elseif (z <= -3.7e-121) tmp = x; elseif (z <= -2.1e-228) tmp = y * t; elseif (z <= -1.4e-289) tmp = x; elseif (z <= 1.2e-26) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.3e+88], N[(z * x), $MachinePrecision], If[LessEqual[z, -1.02e-38], N[(y * t), $MachinePrecision], If[LessEqual[z, -3.7e-121], x, If[LessEqual[z, -2.1e-228], N[(y * t), $MachinePrecision], If[LessEqual[z, -1.4e-289], x, If[LessEqual[z, 1.2e-26], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+88}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-38}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-121}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-228}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-289}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-26}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -4.29999999999999974e88 or 1.2e-26 < z Initial program 100.0%
Taylor expanded in t around 0 59.7%
mul-1-neg59.7%
distribute-rgt-neg-in59.7%
neg-sub059.7%
sub-neg59.7%
+-commutative59.7%
associate--r+59.7%
neg-sub059.7%
remove-double-neg59.7%
Simplified59.7%
Taylor expanded in z around inf 50.1%
*-commutative50.1%
Simplified50.1%
if -4.29999999999999974e88 < z < -1.01999999999999998e-38 or -3.7000000000000002e-121 < z < -2.09999999999999991e-228 or -1.39999999999999993e-289 < z < 1.2e-26Initial program 100.0%
Taylor expanded in t around inf 76.7%
+-commutative76.7%
*-commutative76.7%
fma-def76.8%
Applied egg-rr76.8%
Taylor expanded in y around inf 48.2%
if -1.01999999999999998e-38 < z < -3.7000000000000002e-121 or -2.09999999999999991e-228 < z < -1.39999999999999993e-289Initial program 100.0%
Taylor expanded in t around inf 85.2%
Taylor expanded in x around inf 53.0%
Final simplification49.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* x (- z y)))) (t_2 (* (- y z) t)) (t_3 (+ x t_2)))
(if (<= t -3e-28)
t_3
(if (<= t -5.6e-199)
t_1
(if (<= t -5.8e-206) t_2 (if (<= t 3.1e-32) t_1 t_3))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (x * (z - y));
double t_2 = (y - z) * t;
double t_3 = x + t_2;
double tmp;
if (t <= -3e-28) {
tmp = t_3;
} else if (t <= -5.6e-199) {
tmp = t_1;
} else if (t <= -5.8e-206) {
tmp = t_2;
} else if (t <= 3.1e-32) {
tmp = t_1;
} else {
tmp = t_3;
}
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 + (x * (z - y))
t_2 = (y - z) * t
t_3 = x + t_2
if (t <= (-3d-28)) then
tmp = t_3
else if (t <= (-5.6d-199)) then
tmp = t_1
else if (t <= (-5.8d-206)) then
tmp = t_2
else if (t <= 3.1d-32) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (x * (z - y));
double t_2 = (y - z) * t;
double t_3 = x + t_2;
double tmp;
if (t <= -3e-28) {
tmp = t_3;
} else if (t <= -5.6e-199) {
tmp = t_1;
} else if (t <= -5.8e-206) {
tmp = t_2;
} else if (t <= 3.1e-32) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (x * (z - y)) t_2 = (y - z) * t t_3 = x + t_2 tmp = 0 if t <= -3e-28: tmp = t_3 elif t <= -5.6e-199: tmp = t_1 elif t <= -5.8e-206: tmp = t_2 elif t <= 3.1e-32: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(x * Float64(z - y))) t_2 = Float64(Float64(y - z) * t) t_3 = Float64(x + t_2) tmp = 0.0 if (t <= -3e-28) tmp = t_3; elseif (t <= -5.6e-199) tmp = t_1; elseif (t <= -5.8e-206) tmp = t_2; elseif (t <= 3.1e-32) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (x * (z - y)); t_2 = (y - z) * t; t_3 = x + t_2; tmp = 0.0; if (t <= -3e-28) tmp = t_3; elseif (t <= -5.6e-199) tmp = t_1; elseif (t <= -5.8e-206) tmp = t_2; elseif (t <= 3.1e-32) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$3 = N[(x + t$95$2), $MachinePrecision]}, If[LessEqual[t, -3e-28], t$95$3, If[LessEqual[t, -5.6e-199], t$95$1, If[LessEqual[t, -5.8e-206], t$95$2, If[LessEqual[t, 3.1e-32], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + x \cdot \left(z - y\right)\\
t_2 := \left(y - z\right) \cdot t\\
t_3 := x + t_2\\
\mathbf{if}\;t \leq -3 \cdot 10^{-28}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-199}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-206}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-32}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -3.00000000000000003e-28 or 3.10000000000000011e-32 < t Initial program 100.0%
Taylor expanded in t around inf 85.7%
if -3.00000000000000003e-28 < t < -5.60000000000000036e-199 or -5.8000000000000004e-206 < t < 3.10000000000000011e-32Initial program 100.0%
Taylor expanded in t around 0 81.7%
mul-1-neg81.7%
distribute-rgt-neg-in81.7%
neg-sub081.7%
sub-neg81.7%
+-commutative81.7%
associate--r+81.7%
neg-sub081.7%
remove-double-neg81.7%
Simplified81.7%
if -5.60000000000000036e-199 < t < -5.8000000000000004e-206Initial program 100.0%
Taylor expanded in t around inf 100.0%
+-commutative100.0%
*-commutative100.0%
fma-def100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 100.0%
Final simplification84.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* z (- x t)))) (t_2 (+ x (* y (- t x)))))
(if (<= y -4.6e+29)
t_2
(if (<= y 340000000000.0)
t_1
(if (<= y 8.2e+50) (+ x (* t (- y z))) (if (<= y 2.7e+108) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (z * (x - t));
double t_2 = x + (y * (t - x));
double tmp;
if (y <= -4.6e+29) {
tmp = t_2;
} else if (y <= 340000000000.0) {
tmp = t_1;
} else if (y <= 8.2e+50) {
tmp = x + (t * (y - z));
} else if (y <= 2.7e+108) {
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) :: tmp
t_1 = x + (z * (x - t))
t_2 = x + (y * (t - x))
if (y <= (-4.6d+29)) then
tmp = t_2
else if (y <= 340000000000.0d0) then
tmp = t_1
else if (y <= 8.2d+50) then
tmp = x + (t * (y - z))
else if (y <= 2.7d+108) 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 = x + (z * (x - t));
double t_2 = x + (y * (t - x));
double tmp;
if (y <= -4.6e+29) {
tmp = t_2;
} else if (y <= 340000000000.0) {
tmp = t_1;
} else if (y <= 8.2e+50) {
tmp = x + (t * (y - z));
} else if (y <= 2.7e+108) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (z * (x - t)) t_2 = x + (y * (t - x)) tmp = 0 if y <= -4.6e+29: tmp = t_2 elif y <= 340000000000.0: tmp = t_1 elif y <= 8.2e+50: tmp = x + (t * (y - z)) elif y <= 2.7e+108: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(z * Float64(x - t))) t_2 = Float64(x + Float64(y * Float64(t - x))) tmp = 0.0 if (y <= -4.6e+29) tmp = t_2; elseif (y <= 340000000000.0) tmp = t_1; elseif (y <= 8.2e+50) tmp = Float64(x + Float64(t * Float64(y - z))); elseif (y <= 2.7e+108) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (z * (x - t)); t_2 = x + (y * (t - x)); tmp = 0.0; if (y <= -4.6e+29) tmp = t_2; elseif (y <= 340000000000.0) tmp = t_1; elseif (y <= 8.2e+50) tmp = x + (t * (y - z)); elseif (y <= 2.7e+108) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+29], t$95$2, If[LessEqual[y, 340000000000.0], t$95$1, If[LessEqual[y, 8.2e+50], N[(x + N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+108], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(x - t\right)\\
t_2 := x + y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+29}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 340000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+50}:\\
\;\;\;\;x + t \cdot \left(y - z\right)\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+108}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -4.6000000000000002e29 or 2.7e108 < y Initial program 100.0%
Taylor expanded in y around inf 83.3%
*-commutative83.3%
Simplified83.3%
if -4.6000000000000002e29 < y < 3.4e11 or 8.2000000000000002e50 < y < 2.7e108Initial program 100.0%
Taylor expanded in y around 0 89.3%
mul-1-neg89.3%
unsub-neg89.3%
Simplified89.3%
if 3.4e11 < y < 8.2000000000000002e50Initial program 100.0%
Taylor expanded in t around inf 76.7%
Final simplification86.2%
(FPCore (x y z t)
:precision binary64
(if (or (<= x -1.82e+102)
(not
(or (<= x 1.65e-214) (and (not (<= x 4.1e-168)) (<= x 9.2e+40)))))
(* x (- 1.0 y))
(* t (- y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.82e+102) || !((x <= 1.65e-214) || (!(x <= 4.1e-168) && (x <= 9.2e+40)))) {
tmp = x * (1.0 - y);
} else {
tmp = t * (y - 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 <= (-1.82d+102)) .or. (.not. (x <= 1.65d-214) .or. (.not. (x <= 4.1d-168)) .and. (x <= 9.2d+40))) then
tmp = x * (1.0d0 - y)
else
tmp = t * (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.82e+102) || !((x <= 1.65e-214) || (!(x <= 4.1e-168) && (x <= 9.2e+40)))) {
tmp = x * (1.0 - y);
} else {
tmp = t * (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.82e+102) or not ((x <= 1.65e-214) or (not (x <= 4.1e-168) and (x <= 9.2e+40))): tmp = x * (1.0 - y) else: tmp = t * (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.82e+102) || !((x <= 1.65e-214) || (!(x <= 4.1e-168) && (x <= 9.2e+40)))) tmp = Float64(x * Float64(1.0 - y)); else tmp = Float64(t * Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.82e+102) || ~(((x <= 1.65e-214) || (~((x <= 4.1e-168)) && (x <= 9.2e+40))))) tmp = x * (1.0 - y); else tmp = t * (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.82e+102], N[Not[Or[LessEqual[x, 1.65e-214], And[N[Not[LessEqual[x, 4.1e-168]], $MachinePrecision], LessEqual[x, 9.2e+40]]]], $MachinePrecision]], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.82 \cdot 10^{+102} \lor \neg \left(x \leq 1.65 \cdot 10^{-214} \lor \neg \left(x \leq 4.1 \cdot 10^{-168}\right) \land x \leq 9.2 \cdot 10^{+40}\right):\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y - z\right)\\
\end{array}
\end{array}
if x < -1.8200000000000001e102 or 1.6499999999999999e-214 < x < 4.0999999999999998e-168 or 9.19999999999999975e40 < x Initial program 100.0%
Taylor expanded in t around 0 90.5%
mul-1-neg90.5%
distribute-rgt-neg-in90.5%
neg-sub090.5%
sub-neg90.5%
+-commutative90.5%
associate--r+90.5%
neg-sub090.5%
remove-double-neg90.5%
Simplified90.5%
Taylor expanded in z around 0 53.1%
mul-1-neg53.1%
*-rgt-identity53.1%
distribute-rgt-neg-in53.1%
distribute-lft-in53.1%
unsub-neg53.1%
Simplified53.1%
if -1.8200000000000001e102 < x < 1.6499999999999999e-214 or 4.0999999999999998e-168 < x < 9.19999999999999975e40Initial program 100.0%
Taylor expanded in t around inf 74.0%
+-commutative74.0%
*-commutative74.0%
fma-def74.0%
Applied egg-rr74.0%
Taylor expanded in t around inf 68.0%
Final simplification62.5%
(FPCore (x y z t)
:precision binary64
(if (or (<= t -1.6e-11)
(not
(or (<= t -5.6e-199) (and (not (<= t -2.35e-207)) (<= t 7.5e+15)))))
(* t (- y z))
(+ x (* z x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.6e-11) || !((t <= -5.6e-199) || (!(t <= -2.35e-207) && (t <= 7.5e+15)))) {
tmp = t * (y - z);
} else {
tmp = x + (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 ((t <= (-1.6d-11)) .or. (.not. (t <= (-5.6d-199)) .or. (.not. (t <= (-2.35d-207))) .and. (t <= 7.5d+15))) then
tmp = t * (y - z)
else
tmp = x + (z * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.6e-11) || !((t <= -5.6e-199) || (!(t <= -2.35e-207) && (t <= 7.5e+15)))) {
tmp = t * (y - z);
} else {
tmp = x + (z * x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.6e-11) or not ((t <= -5.6e-199) or (not (t <= -2.35e-207) and (t <= 7.5e+15))): tmp = t * (y - z) else: tmp = x + (z * x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.6e-11) || !((t <= -5.6e-199) || (!(t <= -2.35e-207) && (t <= 7.5e+15)))) tmp = Float64(t * Float64(y - z)); else tmp = Float64(x + Float64(z * x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.6e-11) || ~(((t <= -5.6e-199) || (~((t <= -2.35e-207)) && (t <= 7.5e+15))))) tmp = t * (y - z); else tmp = x + (z * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.6e-11], N[Not[Or[LessEqual[t, -5.6e-199], And[N[Not[LessEqual[t, -2.35e-207]], $MachinePrecision], LessEqual[t, 7.5e+15]]]], $MachinePrecision]], N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{-11} \lor \neg \left(t \leq -5.6 \cdot 10^{-199} \lor \neg \left(t \leq -2.35 \cdot 10^{-207}\right) \land t \leq 7.5 \cdot 10^{+15}\right):\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot x\\
\end{array}
\end{array}
if t < -1.59999999999999997e-11 or -5.60000000000000036e-199 < t < -2.35000000000000014e-207 or 7.5e15 < t Initial program 100.0%
Taylor expanded in t around inf 87.6%
+-commutative87.6%
*-commutative87.6%
fma-def87.6%
Applied egg-rr87.6%
Taylor expanded in t around inf 78.4%
if -1.59999999999999997e-11 < t < -5.60000000000000036e-199 or -2.35000000000000014e-207 < t < 7.5e15Initial program 100.0%
Taylor expanded in t around 0 79.4%
mul-1-neg79.4%
distribute-rgt-neg-in79.4%
neg-sub079.4%
sub-neg79.4%
+-commutative79.4%
associate--r+79.4%
neg-sub079.4%
remove-double-neg79.4%
Simplified79.4%
Taylor expanded in y around 0 57.6%
*-commutative57.6%
Simplified57.6%
Final simplification67.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) t)))
(if (<= x -6.1e+102)
(* z x)
(if (<= x 1.65e-214)
t_1
(if (<= x 4.2e-169) x (if (<= x 9.5e+85) t_1 (* z x)))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double tmp;
if (x <= -6.1e+102) {
tmp = z * x;
} else if (x <= 1.65e-214) {
tmp = t_1;
} else if (x <= 4.2e-169) {
tmp = x;
} else if (x <= 9.5e+85) {
tmp = t_1;
} 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) :: tmp
t_1 = (y - z) * t
if (x <= (-6.1d+102)) then
tmp = z * x
else if (x <= 1.65d-214) then
tmp = t_1
else if (x <= 4.2d-169) then
tmp = x
else if (x <= 9.5d+85) then
tmp = t_1
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 - z) * t;
double tmp;
if (x <= -6.1e+102) {
tmp = z * x;
} else if (x <= 1.65e-214) {
tmp = t_1;
} else if (x <= 4.2e-169) {
tmp = x;
} else if (x <= 9.5e+85) {
tmp = t_1;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * t tmp = 0 if x <= -6.1e+102: tmp = z * x elif x <= 1.65e-214: tmp = t_1 elif x <= 4.2e-169: tmp = x elif x <= 9.5e+85: tmp = t_1 else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * t) tmp = 0.0 if (x <= -6.1e+102) tmp = Float64(z * x); elseif (x <= 1.65e-214) tmp = t_1; elseif (x <= 4.2e-169) tmp = x; elseif (x <= 9.5e+85) tmp = t_1; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * t; tmp = 0.0; if (x <= -6.1e+102) tmp = z * x; elseif (x <= 1.65e-214) tmp = t_1; elseif (x <= 4.2e-169) tmp = x; elseif (x <= 9.5e+85) tmp = t_1; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[x, -6.1e+102], N[(z * x), $MachinePrecision], If[LessEqual[x, 1.65e-214], t$95$1, If[LessEqual[x, 4.2e-169], x, If[LessEqual[x, 9.5e+85], t$95$1, N[(z * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
\mathbf{if}\;x \leq -6.1 \cdot 10^{+102}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{-214}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-169}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if x < -6.1000000000000002e102 or 9.49999999999999945e85 < x Initial program 100.0%
Taylor expanded in t around 0 93.7%
mul-1-neg93.7%
distribute-rgt-neg-in93.7%
neg-sub093.7%
sub-neg93.7%
+-commutative93.7%
associate--r+93.7%
neg-sub093.7%
remove-double-neg93.7%
Simplified93.7%
Taylor expanded in z around inf 47.9%
*-commutative47.9%
Simplified47.9%
if -6.1000000000000002e102 < x < 1.6499999999999999e-214 or 4.2000000000000001e-169 < x < 9.49999999999999945e85Initial program 100.0%
Taylor expanded in t around inf 74.4%
+-commutative74.4%
*-commutative74.4%
fma-def74.4%
Applied egg-rr74.4%
Taylor expanded in t around inf 66.8%
if 1.6499999999999999e-214 < x < 4.2000000000000001e-169Initial program 100.0%
Taylor expanded in t around inf 87.8%
Taylor expanded in x around inf 68.2%
Final simplification60.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- y z))))
(if (<= z -4.2e+88)
(* z x)
(if (<= z -1.65e-56)
t_1
(if (<= z 1.2e-29) (+ x (* y t)) (if (<= z 2.6e+211) t_1 (* z x)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y - z);
double tmp;
if (z <= -4.2e+88) {
tmp = z * x;
} else if (z <= -1.65e-56) {
tmp = t_1;
} else if (z <= 1.2e-29) {
tmp = x + (y * t);
} else if (z <= 2.6e+211) {
tmp = t_1;
} 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) :: tmp
t_1 = t * (y - z)
if (z <= (-4.2d+88)) then
tmp = z * x
else if (z <= (-1.65d-56)) then
tmp = t_1
else if (z <= 1.2d-29) then
tmp = x + (y * t)
else if (z <= 2.6d+211) then
tmp = t_1
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 = t * (y - z);
double tmp;
if (z <= -4.2e+88) {
tmp = z * x;
} else if (z <= -1.65e-56) {
tmp = t_1;
} else if (z <= 1.2e-29) {
tmp = x + (y * t);
} else if (z <= 2.6e+211) {
tmp = t_1;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y - z) tmp = 0 if z <= -4.2e+88: tmp = z * x elif z <= -1.65e-56: tmp = t_1 elif z <= 1.2e-29: tmp = x + (y * t) elif z <= 2.6e+211: tmp = t_1 else: tmp = z * x return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y - z)) tmp = 0.0 if (z <= -4.2e+88) tmp = Float64(z * x); elseif (z <= -1.65e-56) tmp = t_1; elseif (z <= 1.2e-29) tmp = Float64(x + Float64(y * t)); elseif (z <= 2.6e+211) tmp = t_1; else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y - z); tmp = 0.0; if (z <= -4.2e+88) tmp = z * x; elseif (z <= -1.65e-56) tmp = t_1; elseif (z <= 1.2e-29) tmp = x + (y * t); elseif (z <= 2.6e+211) tmp = t_1; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+88], N[(z * x), $MachinePrecision], If[LessEqual[z, -1.65e-56], t$95$1, If[LessEqual[z, 1.2e-29], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+211], t$95$1, N[(z * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(y - z\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+88}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-29}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+211}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -4.2e88 or 2.5999999999999998e211 < z Initial program 100.0%
Taylor expanded in t around 0 66.4%
mul-1-neg66.4%
distribute-rgt-neg-in66.4%
neg-sub066.4%
sub-neg66.4%
+-commutative66.4%
associate--r+66.4%
neg-sub066.4%
remove-double-neg66.4%
Simplified66.4%
Taylor expanded in z around inf 61.7%
*-commutative61.7%
Simplified61.7%
if -4.2e88 < z < -1.64999999999999992e-56 or 1.19999999999999996e-29 < z < 2.5999999999999998e211Initial program 100.0%
Taylor expanded in t around inf 56.0%
+-commutative56.0%
*-commutative56.0%
fma-def56.0%
Applied egg-rr56.0%
Taylor expanded in t around inf 52.9%
if -1.64999999999999992e-56 < z < 1.19999999999999996e-29Initial program 100.0%
Taylor expanded in t around inf 83.1%
Taylor expanded in z around 0 76.8%
Final simplification64.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.65e+102) (not (<= x 3.35e+81))) (+ x (* z x)) (+ x (* t (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.65e+102) || !(x <= 3.35e+81)) {
tmp = x + (z * x);
} else {
tmp = x + (t * (y - 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 <= (-1.65d+102)) .or. (.not. (x <= 3.35d+81))) then
tmp = x + (z * x)
else
tmp = x + (t * (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.65e+102) || !(x <= 3.35e+81)) {
tmp = x + (z * x);
} else {
tmp = x + (t * (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.65e+102) or not (x <= 3.35e+81): tmp = x + (z * x) else: tmp = x + (t * (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.65e+102) || !(x <= 3.35e+81)) tmp = Float64(x + Float64(z * x)); else tmp = Float64(x + Float64(t * Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.65e+102) || ~((x <= 3.35e+81))) tmp = x + (z * x); else tmp = x + (t * (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.65e+102], N[Not[LessEqual[x, 3.35e+81]], $MachinePrecision]], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{+102} \lor \neg \left(x \leq 3.35 \cdot 10^{+81}\right):\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \left(y - z\right)\\
\end{array}
\end{array}
if x < -1.64999999999999999e102 or 3.34999999999999981e81 < x Initial program 100.0%
Taylor expanded in t around 0 93.7%
mul-1-neg93.7%
distribute-rgt-neg-in93.7%
neg-sub093.7%
sub-neg93.7%
+-commutative93.7%
associate--r+93.7%
neg-sub093.7%
remove-double-neg93.7%
Simplified93.7%
Taylor expanded in y around 0 69.0%
*-commutative69.0%
Simplified69.0%
if -1.64999999999999999e102 < x < 3.34999999999999981e81Initial program 100.0%
Taylor expanded in t around inf 75.0%
Final simplification73.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.3e-107) (not (<= y 1.78e-12))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.3e-107) || !(y <= 1.78e-12)) {
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 <= (-3.3d-107)) .or. (.not. (y <= 1.78d-12))) 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 <= -3.3e-107) || !(y <= 1.78e-12)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.3e-107) or not (y <= 1.78e-12): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.3e-107) || !(y <= 1.78e-12)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.3e-107) || ~((y <= 1.78e-12))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.3e-107], N[Not[LessEqual[y, 1.78e-12]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-107} \lor \neg \left(y \leq 1.78 \cdot 10^{-12}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.30000000000000004e-107 or 1.7800000000000001e-12 < y Initial program 100.0%
Taylor expanded in t around inf 59.3%
+-commutative59.3%
*-commutative59.3%
fma-def59.3%
Applied egg-rr59.3%
Taylor expanded in y around inf 43.1%
if -3.30000000000000004e-107 < y < 1.7800000000000001e-12Initial program 100.0%
Taylor expanded in t around inf 67.7%
Taylor expanded in x around inf 36.1%
Final simplification40.4%
(FPCore (x y z t) :precision binary64 (+ x (* (- t x) (- y z))))
double code(double x, double y, double z, double t) {
return x + ((t - 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 - x) * (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t - x) * (y - z));
}
def code(x, y, z, t): return x + ((t - x) * (y - z))
function code(x, y, z, t) return Float64(x + Float64(Float64(t - x) * Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x + ((t - x) * (y - z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t - x), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right) \cdot \left(y - z\right)
\end{array}
Initial program 100.0%
Final simplification100.0%
(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 62.6%
Taylor expanded in x around inf 16.1%
Final simplification16.1%
(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 2024021
(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))))