
(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 17 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 (* (- y z) t)) (t_2 (* x (+ z 1.0))) (t_3 (* x (- 1.0 y))))
(if (<= t -9.6e-6)
t_1
(if (<= t -2.6e-75)
t_3
(if (<= t -6.1e-93)
t_1
(if (<= t -1.4e-209)
t_2
(if (<= t -2.1e-293)
t_3
(if (<= t 1.85e-269)
t_2
(if (<= t 7.5e-90) t_3 (if (<= t 3.1e-54) t_2 t_1))))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double t_2 = x * (z + 1.0);
double t_3 = x * (1.0 - y);
double tmp;
if (t <= -9.6e-6) {
tmp = t_1;
} else if (t <= -2.6e-75) {
tmp = t_3;
} else if (t <= -6.1e-93) {
tmp = t_1;
} else if (t <= -1.4e-209) {
tmp = t_2;
} else if (t <= -2.1e-293) {
tmp = t_3;
} else if (t <= 1.85e-269) {
tmp = t_2;
} else if (t <= 7.5e-90) {
tmp = t_3;
} else if (t <= 3.1e-54) {
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) :: t_3
real(8) :: tmp
t_1 = (y - z) * t
t_2 = x * (z + 1.0d0)
t_3 = x * (1.0d0 - y)
if (t <= (-9.6d-6)) then
tmp = t_1
else if (t <= (-2.6d-75)) then
tmp = t_3
else if (t <= (-6.1d-93)) then
tmp = t_1
else if (t <= (-1.4d-209)) then
tmp = t_2
else if (t <= (-2.1d-293)) then
tmp = t_3
else if (t <= 1.85d-269) then
tmp = t_2
else if (t <= 7.5d-90) then
tmp = t_3
else if (t <= 3.1d-54) 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 - z) * t;
double t_2 = x * (z + 1.0);
double t_3 = x * (1.0 - y);
double tmp;
if (t <= -9.6e-6) {
tmp = t_1;
} else if (t <= -2.6e-75) {
tmp = t_3;
} else if (t <= -6.1e-93) {
tmp = t_1;
} else if (t <= -1.4e-209) {
tmp = t_2;
} else if (t <= -2.1e-293) {
tmp = t_3;
} else if (t <= 1.85e-269) {
tmp = t_2;
} else if (t <= 7.5e-90) {
tmp = t_3;
} else if (t <= 3.1e-54) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * t t_2 = x * (z + 1.0) t_3 = x * (1.0 - y) tmp = 0 if t <= -9.6e-6: tmp = t_1 elif t <= -2.6e-75: tmp = t_3 elif t <= -6.1e-93: tmp = t_1 elif t <= -1.4e-209: tmp = t_2 elif t <= -2.1e-293: tmp = t_3 elif t <= 1.85e-269: tmp = t_2 elif t <= 7.5e-90: tmp = t_3 elif t <= 3.1e-54: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * t) t_2 = Float64(x * Float64(z + 1.0)) t_3 = Float64(x * Float64(1.0 - y)) tmp = 0.0 if (t <= -9.6e-6) tmp = t_1; elseif (t <= -2.6e-75) tmp = t_3; elseif (t <= -6.1e-93) tmp = t_1; elseif (t <= -1.4e-209) tmp = t_2; elseif (t <= -2.1e-293) tmp = t_3; elseif (t <= 1.85e-269) tmp = t_2; elseif (t <= 7.5e-90) tmp = t_3; elseif (t <= 3.1e-54) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * t; t_2 = x * (z + 1.0); t_3 = x * (1.0 - y); tmp = 0.0; if (t <= -9.6e-6) tmp = t_1; elseif (t <= -2.6e-75) tmp = t_3; elseif (t <= -6.1e-93) tmp = t_1; elseif (t <= -1.4e-209) tmp = t_2; elseif (t <= -2.1e-293) tmp = t_3; elseif (t <= 1.85e-269) tmp = t_2; elseif (t <= 7.5e-90) tmp = t_3; elseif (t <= 3.1e-54) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.6e-6], t$95$1, If[LessEqual[t, -2.6e-75], t$95$3, If[LessEqual[t, -6.1e-93], t$95$1, If[LessEqual[t, -1.4e-209], t$95$2, If[LessEqual[t, -2.1e-293], t$95$3, If[LessEqual[t, 1.85e-269], t$95$2, If[LessEqual[t, 7.5e-90], t$95$3, If[LessEqual[t, 3.1e-54], t$95$2, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
t_2 := x \cdot \left(z + 1\right)\\
t_3 := x \cdot \left(1 - y\right)\\
\mathbf{if}\;t \leq -9.6 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-75}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -6.1 \cdot 10^{-93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-209}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-293}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-269}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-90}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-54}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -9.5999999999999996e-6 or -2.6e-75 < t < -6.09999999999999971e-93 or 3.10000000000000004e-54 < t Initial program 100.0%
Taylor expanded in x around 0 88.5%
+-commutative88.5%
mul-1-neg88.5%
neg-sub088.5%
associate-+l-88.5%
associate--r+88.5%
+-commutative88.5%
neg-sub088.5%
distribute-rgt-neg-in88.5%
mul-1-neg88.5%
fma-def94.2%
mul-1-neg94.2%
distribute-rgt-neg-in94.2%
neg-sub094.2%
+-commutative94.2%
associate--r+94.2%
associate-+l-94.2%
neg-sub094.2%
mul-1-neg94.2%
+-commutative94.2%
mul-1-neg94.2%
Simplified94.2%
Taylor expanded in t around inf 73.2%
if -9.5999999999999996e-6 < t < -2.6e-75 or -1.40000000000000006e-209 < t < -2.10000000000000005e-293 or 1.84999999999999989e-269 < t < 7.4999999999999999e-90Initial program 100.0%
Taylor expanded in x around inf 83.9%
mul-1-neg83.9%
unsub-neg83.9%
Simplified83.9%
Taylor expanded in z around 0 64.6%
if -6.09999999999999971e-93 < t < -1.40000000000000006e-209 or -2.10000000000000005e-293 < t < 1.84999999999999989e-269 or 7.4999999999999999e-90 < t < 3.10000000000000004e-54Initial program 100.0%
Taylor expanded in x around inf 86.7%
mul-1-neg86.7%
unsub-neg86.7%
Simplified86.7%
Taylor expanded in y around 0 76.5%
+-commutative76.5%
Simplified76.5%
Final simplification71.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y z) t)))
(if (<= t -7.2e-94)
t_1
(if (<= t -9.6e-120)
(* z x)
(if (<= t -8.8e-133)
(* y t)
(if (<= t -3.7e-147)
x
(if (<= t 1.16e-265)
(* z x)
(if (<= t 3.3e-134) (* y (- x)) t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = (y - z) * t;
double tmp;
if (t <= -7.2e-94) {
tmp = t_1;
} else if (t <= -9.6e-120) {
tmp = z * x;
} else if (t <= -8.8e-133) {
tmp = y * t;
} else if (t <= -3.7e-147) {
tmp = x;
} else if (t <= 1.16e-265) {
tmp = z * x;
} else if (t <= 3.3e-134) {
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 = (y - z) * t
if (t <= (-7.2d-94)) then
tmp = t_1
else if (t <= (-9.6d-120)) then
tmp = z * x
else if (t <= (-8.8d-133)) then
tmp = y * t
else if (t <= (-3.7d-147)) then
tmp = x
else if (t <= 1.16d-265) then
tmp = z * x
else if (t <= 3.3d-134) 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 = (y - z) * t;
double tmp;
if (t <= -7.2e-94) {
tmp = t_1;
} else if (t <= -9.6e-120) {
tmp = z * x;
} else if (t <= -8.8e-133) {
tmp = y * t;
} else if (t <= -3.7e-147) {
tmp = x;
} else if (t <= 1.16e-265) {
tmp = z * x;
} else if (t <= 3.3e-134) {
tmp = y * -x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - z) * t tmp = 0 if t <= -7.2e-94: tmp = t_1 elif t <= -9.6e-120: tmp = z * x elif t <= -8.8e-133: tmp = y * t elif t <= -3.7e-147: tmp = x elif t <= 1.16e-265: tmp = z * x elif t <= 3.3e-134: tmp = y * -x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - z) * t) tmp = 0.0 if (t <= -7.2e-94) tmp = t_1; elseif (t <= -9.6e-120) tmp = Float64(z * x); elseif (t <= -8.8e-133) tmp = Float64(y * t); elseif (t <= -3.7e-147) tmp = x; elseif (t <= 1.16e-265) tmp = Float64(z * x); elseif (t <= 3.3e-134) tmp = Float64(y * Float64(-x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - z) * t; tmp = 0.0; if (t <= -7.2e-94) tmp = t_1; elseif (t <= -9.6e-120) tmp = z * x; elseif (t <= -8.8e-133) tmp = y * t; elseif (t <= -3.7e-147) tmp = x; elseif (t <= 1.16e-265) tmp = z * x; elseif (t <= 3.3e-134) tmp = y * -x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -7.2e-94], t$95$1, If[LessEqual[t, -9.6e-120], N[(z * x), $MachinePrecision], If[LessEqual[t, -8.8e-133], N[(y * t), $MachinePrecision], If[LessEqual[t, -3.7e-147], x, If[LessEqual[t, 1.16e-265], N[(z * x), $MachinePrecision], If[LessEqual[t, 3.3e-134], N[(y * (-x)), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot t\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -9.6 \cdot 10^{-120}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;t \leq -8.8 \cdot 10^{-133}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-147}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{-265}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-134}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -7.2e-94 or 3.30000000000000019e-134 < t Initial program 100.0%
Taylor expanded in x around 0 90.3%
+-commutative90.3%
mul-1-neg90.3%
neg-sub090.3%
associate-+l-90.3%
associate--r+90.3%
+-commutative90.3%
neg-sub090.3%
distribute-rgt-neg-in90.3%
mul-1-neg90.3%
fma-def95.1%
mul-1-neg95.1%
distribute-rgt-neg-in95.1%
neg-sub095.1%
+-commutative95.1%
associate--r+95.1%
associate-+l-95.1%
neg-sub095.1%
mul-1-neg95.1%
+-commutative95.1%
mul-1-neg95.1%
Simplified95.1%
Taylor expanded in t around inf 65.0%
if -7.2e-94 < t < -9.5999999999999998e-120 or -3.7000000000000002e-147 < t < 1.15999999999999998e-265Initial program 100.0%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
mul-1-neg100.0%
neg-sub0100.0%
associate-+l-100.0%
associate--r+100.0%
+-commutative100.0%
neg-sub0100.0%
distribute-rgt-neg-in100.0%
mul-1-neg100.0%
fma-def100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 62.5%
Taylor expanded in t around 0 51.4%
if -9.5999999999999998e-120 < t < -8.8000000000000003e-133Initial program 100.0%
Taylor expanded in y around inf 76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in t around inf 75.2%
*-commutative75.2%
Simplified75.2%
Taylor expanded in x around 0 75.2%
*-commutative75.2%
Simplified75.2%
if -8.8000000000000003e-133 < t < -3.7000000000000002e-147Initial program 100.0%
Taylor expanded in y around inf 76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y around 0 76.5%
if 1.15999999999999998e-265 < t < 3.30000000000000019e-134Initial program 99.9%
Taylor expanded in x around 0 99.9%
+-commutative99.9%
mul-1-neg99.9%
neg-sub099.9%
associate-+l-99.9%
associate--r+99.9%
+-commutative99.9%
neg-sub099.9%
distribute-rgt-neg-in99.9%
mul-1-neg99.9%
fma-def100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 50.9%
neg-mul-150.9%
sub-neg50.9%
Simplified50.9%
Taylor expanded in t around 0 50.9%
mul-1-neg50.9%
distribute-rgt-neg-in50.9%
Simplified50.9%
Final simplification61.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -2.25e-61)
t_1
(if (<= z -4.8e-129)
(* y (- x))
(if (<= z -8.2e-197)
(* y t)
(if (<= z 9.5e-293)
x
(if (<= z 58000000000.0)
(* y t)
(if (<= z 1e+218) (* z x) t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -2.25e-61) {
tmp = t_1;
} else if (z <= -4.8e-129) {
tmp = y * -x;
} else if (z <= -8.2e-197) {
tmp = y * t;
} else if (z <= 9.5e-293) {
tmp = x;
} else if (z <= 58000000000.0) {
tmp = y * t;
} else if (z <= 1e+218) {
tmp = z * 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 * -t
if (z <= (-2.25d-61)) then
tmp = t_1
else if (z <= (-4.8d-129)) then
tmp = y * -x
else if (z <= (-8.2d-197)) then
tmp = y * t
else if (z <= 9.5d-293) then
tmp = x
else if (z <= 58000000000.0d0) then
tmp = y * t
else if (z <= 1d+218) then
tmp = z * 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 * -t;
double tmp;
if (z <= -2.25e-61) {
tmp = t_1;
} else if (z <= -4.8e-129) {
tmp = y * -x;
} else if (z <= -8.2e-197) {
tmp = y * t;
} else if (z <= 9.5e-293) {
tmp = x;
} else if (z <= 58000000000.0) {
tmp = y * t;
} else if (z <= 1e+218) {
tmp = z * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -2.25e-61: tmp = t_1 elif z <= -4.8e-129: tmp = y * -x elif z <= -8.2e-197: tmp = y * t elif z <= 9.5e-293: tmp = x elif z <= 58000000000.0: tmp = y * t elif z <= 1e+218: tmp = z * x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -2.25e-61) tmp = t_1; elseif (z <= -4.8e-129) tmp = Float64(y * Float64(-x)); elseif (z <= -8.2e-197) tmp = Float64(y * t); elseif (z <= 9.5e-293) tmp = x; elseif (z <= 58000000000.0) tmp = Float64(y * t); elseif (z <= 1e+218) tmp = Float64(z * x); 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 <= -2.25e-61) tmp = t_1; elseif (z <= -4.8e-129) tmp = y * -x; elseif (z <= -8.2e-197) tmp = y * t; elseif (z <= 9.5e-293) tmp = x; elseif (z <= 58000000000.0) tmp = y * t; elseif (z <= 1e+218) tmp = z * x; 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, -2.25e-61], t$95$1, If[LessEqual[z, -4.8e-129], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, -8.2e-197], N[(y * t), $MachinePrecision], If[LessEqual[z, 9.5e-293], x, If[LessEqual[z, 58000000000.0], N[(y * t), $MachinePrecision], If[LessEqual[z, 1e+218], N[(z * x), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -2.25 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.8 \cdot 10^{-129}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-197}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-293}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 58000000000:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 10^{+218}:\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.25e-61 or 1.00000000000000008e218 < z Initial program 99.9%
Taylor expanded in y around 0 86.3%
mul-1-neg86.3%
unsub-neg86.3%
Simplified86.3%
Taylor expanded in x around 0 51.9%
associate-*r*51.9%
neg-mul-151.9%
Simplified51.9%
if -2.25e-61 < z < -4.79999999999999977e-129Initial program 100.0%
Taylor expanded in x around 0 94.4%
+-commutative94.4%
mul-1-neg94.4%
neg-sub094.4%
associate-+l-94.4%
associate--r+94.4%
+-commutative94.4%
neg-sub094.4%
distribute-rgt-neg-in94.4%
mul-1-neg94.4%
fma-def100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 62.3%
neg-mul-162.3%
sub-neg62.3%
Simplified62.3%
Taylor expanded in t around 0 46.3%
mul-1-neg46.3%
distribute-rgt-neg-in46.3%
Simplified46.3%
if -4.79999999999999977e-129 < z < -8.2e-197 or 9.50000000000000049e-293 < z < 5.8e10Initial program 100.0%
Taylor expanded in y around inf 89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in t around inf 70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in x around 0 49.7%
*-commutative49.7%
Simplified49.7%
if -8.2e-197 < z < 9.50000000000000049e-293Initial program 100.0%
Taylor expanded in y around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 51.6%
if 5.8e10 < z < 1.00000000000000008e218Initial program 99.9%
Taylor expanded in x around 0 94.1%
+-commutative94.1%
mul-1-neg94.1%
neg-sub094.1%
associate-+l-94.1%
associate--r+94.1%
+-commutative94.1%
neg-sub094.1%
distribute-rgt-neg-in94.1%
mul-1-neg94.1%
fma-def98.0%
mul-1-neg98.0%
distribute-rgt-neg-in98.0%
neg-sub098.0%
+-commutative98.0%
associate--r+98.0%
associate-+l-98.0%
neg-sub098.0%
mul-1-neg98.0%
+-commutative98.0%
mul-1-neg98.0%
Simplified98.0%
Taylor expanded in z around inf 82.6%
Taylor expanded in t around 0 51.7%
Final simplification50.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (* x (+ z 1.0))))
(if (<= y -0.00024)
t_1
(if (<= y 6e-131)
t_2
(if (<= y 7.5e-53) (* (- y z) t) (if (<= y 0.0126) 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 <= -0.00024) {
tmp = t_1;
} else if (y <= 6e-131) {
tmp = t_2;
} else if (y <= 7.5e-53) {
tmp = (y - z) * t;
} else if (y <= 0.0126) {
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 <= (-0.00024d0)) then
tmp = t_1
else if (y <= 6d-131) then
tmp = t_2
else if (y <= 7.5d-53) then
tmp = (y - z) * t
else if (y <= 0.0126d0) 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 <= -0.00024) {
tmp = t_1;
} else if (y <= 6e-131) {
tmp = t_2;
} else if (y <= 7.5e-53) {
tmp = (y - z) * t;
} else if (y <= 0.0126) {
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 <= -0.00024: tmp = t_1 elif y <= 6e-131: tmp = t_2 elif y <= 7.5e-53: tmp = (y - z) * t elif y <= 0.0126: 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 <= -0.00024) tmp = t_1; elseif (y <= 6e-131) tmp = t_2; elseif (y <= 7.5e-53) tmp = Float64(Float64(y - z) * t); elseif (y <= 0.0126) 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 <= -0.00024) tmp = t_1; elseif (y <= 6e-131) tmp = t_2; elseif (y <= 7.5e-53) tmp = (y - z) * t; elseif (y <= 0.0126) 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, -0.00024], t$95$1, If[LessEqual[y, 6e-131], t$95$2, If[LessEqual[y, 7.5e-53], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 0.0126], 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 -0.00024:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-131}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-53}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{elif}\;y \leq 0.0126:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.40000000000000006e-4 or 0.0126 < y Initial program 100.0%
Taylor expanded in x around 0 93.4%
+-commutative93.4%
mul-1-neg93.4%
neg-sub093.4%
associate-+l-93.4%
associate--r+93.4%
+-commutative93.4%
neg-sub093.4%
distribute-rgt-neg-in93.4%
mul-1-neg93.4%
fma-def97.1%
mul-1-neg97.1%
distribute-rgt-neg-in97.1%
neg-sub097.1%
+-commutative97.1%
associate--r+97.1%
associate-+l-97.1%
neg-sub097.1%
mul-1-neg97.1%
+-commutative97.1%
mul-1-neg97.1%
Simplified97.1%
Taylor expanded in y around inf 76.1%
neg-mul-176.1%
sub-neg76.1%
Simplified76.1%
if -2.40000000000000006e-4 < y < 5.99999999999999992e-131 or 7.5000000000000001e-53 < y < 0.0126Initial program 100.0%
Taylor expanded in x around inf 65.5%
mul-1-neg65.5%
unsub-neg65.5%
Simplified65.5%
Taylor expanded in y around 0 64.6%
+-commutative64.6%
Simplified64.6%
if 5.99999999999999992e-131 < y < 7.5000000000000001e-53Initial program 99.9%
Taylor expanded in x around 0 99.9%
+-commutative99.9%
mul-1-neg99.9%
neg-sub099.9%
associate-+l-99.9%
associate--r+99.9%
+-commutative99.9%
neg-sub099.9%
distribute-rgt-neg-in99.9%
mul-1-neg99.9%
fma-def100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 64.2%
Final simplification70.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -620000000.0)
t_1
(if (<= z -1.35e-144)
(* x (- 1.0 y))
(if (<= z 7.5e-58)
(+ x (* y t))
(if (<= z 450000000000.0) (* y (- t x)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -620000000.0) {
tmp = t_1;
} else if (z <= -1.35e-144) {
tmp = x * (1.0 - y);
} else if (z <= 7.5e-58) {
tmp = x + (y * t);
} else if (z <= 450000000000.0) {
tmp = y * (t - 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 <= (-620000000.0d0)) then
tmp = t_1
else if (z <= (-1.35d-144)) then
tmp = x * (1.0d0 - y)
else if (z <= 7.5d-58) then
tmp = x + (y * t)
else if (z <= 450000000000.0d0) then
tmp = y * (t - 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 <= -620000000.0) {
tmp = t_1;
} else if (z <= -1.35e-144) {
tmp = x * (1.0 - y);
} else if (z <= 7.5e-58) {
tmp = x + (y * t);
} else if (z <= 450000000000.0) {
tmp = y * (t - x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -620000000.0: tmp = t_1 elif z <= -1.35e-144: tmp = x * (1.0 - y) elif z <= 7.5e-58: tmp = x + (y * t) elif z <= 450000000000.0: tmp = y * (t - 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 <= -620000000.0) tmp = t_1; elseif (z <= -1.35e-144) tmp = Float64(x * Float64(1.0 - y)); elseif (z <= 7.5e-58) tmp = Float64(x + Float64(y * t)); elseif (z <= 450000000000.0) tmp = Float64(y * Float64(t - 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 <= -620000000.0) tmp = t_1; elseif (z <= -1.35e-144) tmp = x * (1.0 - y); elseif (z <= 7.5e-58) tmp = x + (y * t); elseif (z <= 450000000000.0) tmp = y * (t - 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, -620000000.0], t$95$1, If[LessEqual[z, -1.35e-144], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-58], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 450000000000.0], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -620000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-144}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-58}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 450000000000:\\
\;\;\;\;y \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.2e8 or 4.5e11 < z Initial program 100.0%
Taylor expanded in x around 0 91.3%
+-commutative91.3%
mul-1-neg91.3%
neg-sub091.3%
associate-+l-91.3%
associate--r+91.3%
+-commutative91.3%
neg-sub091.3%
distribute-rgt-neg-in91.3%
mul-1-neg91.3%
fma-def94.5%
mul-1-neg94.5%
distribute-rgt-neg-in94.5%
neg-sub094.5%
+-commutative94.5%
associate--r+94.5%
associate-+l-94.5%
neg-sub094.5%
mul-1-neg94.5%
+-commutative94.5%
mul-1-neg94.5%
Simplified94.5%
Taylor expanded in z around inf 83.6%
neg-mul-183.6%
sub-neg83.6%
Simplified83.6%
if -6.2e8 < z < -1.34999999999999988e-144Initial program 99.9%
Taylor expanded in x around inf 72.4%
mul-1-neg72.4%
unsub-neg72.4%
Simplified72.4%
Taylor expanded in z around 0 69.5%
if -1.34999999999999988e-144 < z < 7.50000000000000002e-58Initial program 100.0%
Taylor expanded in y around inf 94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in t around inf 76.6%
*-commutative76.6%
Simplified76.6%
if 7.50000000000000002e-58 < z < 4.5e11Initial program 100.0%
Taylor expanded in x around 0 95.5%
+-commutative95.5%
mul-1-neg95.5%
neg-sub095.5%
associate-+l-95.5%
associate--r+95.5%
+-commutative95.5%
neg-sub095.5%
distribute-rgt-neg-in95.5%
mul-1-neg95.5%
fma-def100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 73.2%
neg-mul-173.2%
sub-neg73.2%
Simplified73.2%
Final simplification78.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -50000000.0)
t_1
(if (<= z 3.2e-293)
(* x (- 1.0 y))
(if (<= z 200000000000.0) (* y (- t x)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -50000000.0) {
tmp = t_1;
} else if (z <= 3.2e-293) {
tmp = x * (1.0 - y);
} else if (z <= 200000000000.0) {
tmp = y * (t - 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 <= (-50000000.0d0)) then
tmp = t_1
else if (z <= 3.2d-293) then
tmp = x * (1.0d0 - y)
else if (z <= 200000000000.0d0) then
tmp = y * (t - 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 <= -50000000.0) {
tmp = t_1;
} else if (z <= 3.2e-293) {
tmp = x * (1.0 - y);
} else if (z <= 200000000000.0) {
tmp = y * (t - x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -50000000.0: tmp = t_1 elif z <= 3.2e-293: tmp = x * (1.0 - y) elif z <= 200000000000.0: tmp = y * (t - 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 <= -50000000.0) tmp = t_1; elseif (z <= 3.2e-293) tmp = Float64(x * Float64(1.0 - y)); elseif (z <= 200000000000.0) tmp = Float64(y * Float64(t - 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 <= -50000000.0) tmp = t_1; elseif (z <= 3.2e-293) tmp = x * (1.0 - y); elseif (z <= 200000000000.0) tmp = y * (t - 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, -50000000.0], t$95$1, If[LessEqual[z, 3.2e-293], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 200000000000.0], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -50000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-293}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{elif}\;z \leq 200000000000:\\
\;\;\;\;y \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5e7 or 2e11 < z Initial program 100.0%
Taylor expanded in x around 0 91.3%
+-commutative91.3%
mul-1-neg91.3%
neg-sub091.3%
associate-+l-91.3%
associate--r+91.3%
+-commutative91.3%
neg-sub091.3%
distribute-rgt-neg-in91.3%
mul-1-neg91.3%
fma-def94.5%
mul-1-neg94.5%
distribute-rgt-neg-in94.5%
neg-sub094.5%
+-commutative94.5%
associate--r+94.5%
associate-+l-94.5%
neg-sub094.5%
mul-1-neg94.5%
+-commutative94.5%
mul-1-neg94.5%
Simplified94.5%
Taylor expanded in z around inf 83.6%
neg-mul-183.6%
sub-neg83.6%
Simplified83.6%
if -5e7 < z < 3.20000000000000005e-293Initial program 100.0%
Taylor expanded in x around inf 70.0%
mul-1-neg70.0%
unsub-neg70.0%
Simplified70.0%
Taylor expanded in z around 0 68.6%
if 3.20000000000000005e-293 < z < 2e11Initial program 100.0%
Taylor expanded in x around 0 95.3%
+-commutative95.3%
mul-1-neg95.3%
neg-sub095.3%
associate-+l-95.3%
associate--r+95.3%
+-commutative95.3%
neg-sub095.3%
distribute-rgt-neg-in95.3%
mul-1-neg95.3%
fma-def100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 68.3%
neg-mul-168.3%
sub-neg68.3%
Simplified68.3%
Final simplification76.0%
(FPCore (x y z t) :precision binary64 (if (or (<= t -70000000000000.0) (not (<= t 1.7e+46))) (* (- y z) t) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -70000000000000.0) || !(t <= 1.7e+46)) {
tmp = (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 <= (-70000000000000.0d0)) .or. (.not. (t <= 1.7d+46))) then
tmp = (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 <= -70000000000000.0) || !(t <= 1.7e+46)) {
tmp = (y - z) * t;
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -70000000000000.0) or not (t <= 1.7e+46): tmp = (y - z) * t else: tmp = x * ((z - y) + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -70000000000000.0) || !(t <= 1.7e+46)) tmp = 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 <= -70000000000000.0) || ~((t <= 1.7e+46))) tmp = (y - z) * t; else tmp = x * ((z - y) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -70000000000000.0], N[Not[LessEqual[t, 1.7e+46]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -70000000000000 \lor \neg \left(t \leq 1.7 \cdot 10^{+46}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\end{array}
\end{array}
if t < -7e13 or 1.6999999999999999e46 < t Initial program 100.0%
Taylor expanded in x around 0 85.9%
+-commutative85.9%
mul-1-neg85.9%
neg-sub085.9%
associate-+l-85.9%
associate--r+85.9%
+-commutative85.9%
neg-sub085.9%
distribute-rgt-neg-in85.9%
mul-1-neg85.9%
fma-def92.9%
mul-1-neg92.9%
distribute-rgt-neg-in92.9%
neg-sub092.9%
+-commutative92.9%
associate--r+92.9%
associate-+l-92.9%
neg-sub092.9%
mul-1-neg92.9%
+-commutative92.9%
mul-1-neg92.9%
Simplified92.9%
Taylor expanded in t around inf 77.8%
if -7e13 < t < 1.6999999999999999e46Initial program 100.0%
Taylor expanded in x around inf 78.9%
mul-1-neg78.9%
unsub-neg78.9%
Simplified78.9%
Final simplification78.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.35e+16) (not (<= t 6.8e-13))) (+ x (* (- y z) t)) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.35e+16) || !(t <= 6.8e-13)) {
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 <= (-1.35d+16)) .or. (.not. (t <= 6.8d-13))) 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 <= -1.35e+16) || !(t <= 6.8e-13)) {
tmp = x + ((y - z) * t);
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.35e+16) or not (t <= 6.8e-13): 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 <= -1.35e+16) || !(t <= 6.8e-13)) 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 <= -1.35e+16) || ~((t <= 6.8e-13))) 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, -1.35e+16], N[Not[LessEqual[t, 6.8e-13]], $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 -1.35 \cdot 10^{+16} \lor \neg \left(t \leq 6.8 \cdot 10^{-13}\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 < -1.35e16 or 6.80000000000000031e-13 < t Initial program 100.0%
Taylor expanded in t around inf 85.3%
if -1.35e16 < t < 6.80000000000000031e-13Initial program 100.0%
Taylor expanded in x around inf 80.3%
mul-1-neg80.3%
unsub-neg80.3%
Simplified80.3%
Final simplification82.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -165000000000.0) (not (<= z 480000000000.0))) (* z (- x t)) (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -165000000000.0) || !(z <= 480000000000.0)) {
tmp = 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 <= (-165000000000.0d0)) .or. (.not. (z <= 480000000000.0d0))) then
tmp = 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 <= -165000000000.0) || !(z <= 480000000000.0)) {
tmp = z * (x - t);
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -165000000000.0) or not (z <= 480000000000.0): tmp = z * (x - t) else: tmp = x + (y * (t - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -165000000000.0) || !(z <= 480000000000.0)) tmp = 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 <= -165000000000.0) || ~((z <= 480000000000.0))) tmp = z * (x - t); else tmp = x + (y * (t - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -165000000000.0], N[Not[LessEqual[z, 480000000000.0]], $MachinePrecision]], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -165000000000 \lor \neg \left(z \leq 480000000000\right):\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -1.65e11 or 4.8e11 < z Initial program 100.0%
Taylor expanded in x around 0 91.3%
+-commutative91.3%
mul-1-neg91.3%
neg-sub091.3%
associate-+l-91.3%
associate--r+91.3%
+-commutative91.3%
neg-sub091.3%
distribute-rgt-neg-in91.3%
mul-1-neg91.3%
fma-def94.5%
mul-1-neg94.5%
distribute-rgt-neg-in94.5%
neg-sub094.5%
+-commutative94.5%
associate--r+94.5%
associate-+l-94.5%
neg-sub094.5%
mul-1-neg94.5%
+-commutative94.5%
mul-1-neg94.5%
Simplified94.5%
Taylor expanded in z around inf 83.6%
neg-mul-183.6%
sub-neg83.6%
Simplified83.6%
if -1.65e11 < z < 4.8e11Initial program 100.0%
Taylor expanded in y around inf 88.8%
*-commutative88.8%
Simplified88.8%
Final simplification86.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4e-61) (not (<= z 115000000000.0))) (+ x (* z (- x t))) (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4e-61) || !(z <= 115000000000.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 <= (-4d-61)) .or. (.not. (z <= 115000000000.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 <= -4e-61) || !(z <= 115000000000.0)) {
tmp = x + (z * (x - t));
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4e-61) or not (z <= 115000000000.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 <= -4e-61) || !(z <= 115000000000.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 <= -4e-61) || ~((z <= 115000000000.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, -4e-61], N[Not[LessEqual[z, 115000000000.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 -4 \cdot 10^{-61} \lor \neg \left(z \leq 115000000000\right):\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -4.0000000000000002e-61 or 1.15e11 < z Initial program 99.9%
Taylor expanded in y around 0 82.6%
mul-1-neg82.6%
unsub-neg82.6%
Simplified82.6%
if -4.0000000000000002e-61 < z < 1.15e11Initial program 100.0%
Taylor expanded in y around inf 91.9%
*-commutative91.9%
Simplified91.9%
Final simplification86.9%
(FPCore (x y z t) :precision binary64 (if (<= z -2.3e+19) (* z x) (if (<= z 9.5e-293) x (if (<= z 62000000000.0) (* y t) (* z x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.3e+19) {
tmp = z * x;
} else if (z <= 9.5e-293) {
tmp = x;
} else if (z <= 62000000000.0) {
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 <= (-2.3d+19)) then
tmp = z * x
else if (z <= 9.5d-293) then
tmp = x
else if (z <= 62000000000.0d0) 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 <= -2.3e+19) {
tmp = z * x;
} else if (z <= 9.5e-293) {
tmp = x;
} else if (z <= 62000000000.0) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.3e+19: tmp = z * x elif z <= 9.5e-293: tmp = x elif z <= 62000000000.0: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.3e+19) tmp = Float64(z * x); elseif (z <= 9.5e-293) tmp = x; elseif (z <= 62000000000.0) 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 <= -2.3e+19) tmp = z * x; elseif (z <= 9.5e-293) tmp = x; elseif (z <= 62000000000.0) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.3e+19], N[(z * x), $MachinePrecision], If[LessEqual[z, 9.5e-293], x, If[LessEqual[z, 62000000000.0], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+19}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-293}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 62000000000:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -2.3e19 or 6.2e10 < z Initial program 100.0%
Taylor expanded in x around 0 91.2%
+-commutative91.2%
mul-1-neg91.2%
neg-sub091.2%
associate-+l-91.2%
associate--r+91.2%
+-commutative91.2%
neg-sub091.2%
distribute-rgt-neg-in91.2%
mul-1-neg91.2%
fma-def94.4%
mul-1-neg94.4%
distribute-rgt-neg-in94.4%
neg-sub094.4%
+-commutative94.4%
associate--r+94.4%
associate-+l-94.4%
neg-sub094.4%
mul-1-neg94.4%
+-commutative94.4%
mul-1-neg94.4%
Simplified94.4%
Taylor expanded in z around inf 85.2%
Taylor expanded in t around 0 46.9%
if -2.3e19 < z < 9.50000000000000049e-293Initial program 100.0%
Taylor expanded in y around inf 87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y around 0 37.6%
if 9.50000000000000049e-293 < z < 6.2e10Initial program 100.0%
Taylor expanded in y around inf 87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in t around inf 67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in x around 0 48.6%
*-commutative48.6%
Simplified48.6%
Final simplification44.9%
(FPCore (x y z t) :precision binary64 (if (<= z -4.1e+65) (* z x) (if (<= z -8.8e-129) (* y (- x)) (if (<= z 800000000.0) (* y t) (* z x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.1e+65) {
tmp = z * x;
} else if (z <= -8.8e-129) {
tmp = y * -x;
} else if (z <= 800000000.0) {
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.1d+65)) then
tmp = z * x
else if (z <= (-8.8d-129)) then
tmp = y * -x
else if (z <= 800000000.0d0) 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.1e+65) {
tmp = z * x;
} else if (z <= -8.8e-129) {
tmp = y * -x;
} else if (z <= 800000000.0) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.1e+65: tmp = z * x elif z <= -8.8e-129: tmp = y * -x elif z <= 800000000.0: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.1e+65) tmp = Float64(z * x); elseif (z <= -8.8e-129) tmp = Float64(y * Float64(-x)); elseif (z <= 800000000.0) 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.1e+65) tmp = z * x; elseif (z <= -8.8e-129) tmp = y * -x; elseif (z <= 800000000.0) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.1e+65], N[(z * x), $MachinePrecision], If[LessEqual[z, -8.8e-129], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 800000000.0], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+65}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-129}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 800000000:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -4.1000000000000001e65 or 8e8 < z Initial program 99.9%
Taylor expanded in x around 0 90.9%
+-commutative90.9%
mul-1-neg90.9%
neg-sub090.9%
associate-+l-90.9%
associate--r+90.9%
+-commutative90.9%
neg-sub090.9%
distribute-rgt-neg-in90.9%
mul-1-neg90.9%
fma-def94.2%
mul-1-neg94.2%
distribute-rgt-neg-in94.2%
neg-sub094.2%
+-commutative94.2%
associate--r+94.2%
associate-+l-94.2%
neg-sub094.2%
mul-1-neg94.2%
+-commutative94.2%
mul-1-neg94.2%
Simplified94.2%
Taylor expanded in z around inf 86.9%
Taylor expanded in t around 0 47.9%
if -4.1000000000000001e65 < z < -8.80000000000000012e-129Initial program 99.9%
Taylor expanded in x around 0 97.3%
+-commutative97.3%
mul-1-neg97.3%
neg-sub097.3%
associate-+l-97.3%
associate--r+97.3%
+-commutative97.3%
neg-sub097.3%
distribute-rgt-neg-in97.3%
mul-1-neg97.3%
fma-def100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
neg-sub0100.0%
+-commutative100.0%
associate--r+100.0%
associate-+l-100.0%
neg-sub0100.0%
mul-1-neg100.0%
+-commutative100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around inf 47.1%
neg-mul-147.1%
sub-neg47.1%
Simplified47.1%
Taylor expanded in t around 0 39.2%
mul-1-neg39.2%
distribute-rgt-neg-in39.2%
Simplified39.2%
if -8.80000000000000012e-129 < z < 8e8Initial program 100.0%
Taylor expanded in y around inf 92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in t around inf 72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in x around 0 45.1%
*-commutative45.1%
Simplified45.1%
Final simplification45.6%
(FPCore (x y z t) :precision binary64 (if (or (<= t -6.5e-93) (not (<= t 1.3e-55))) (* (- y z) t) (* x (+ z 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -6.5e-93) || !(t <= 1.3e-55)) {
tmp = (y - z) * t;
} 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 ((t <= (-6.5d-93)) .or. (.not. (t <= 1.3d-55))) then
tmp = (y - z) * t
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 ((t <= -6.5e-93) || !(t <= 1.3e-55)) {
tmp = (y - z) * t;
} else {
tmp = x * (z + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -6.5e-93) or not (t <= 1.3e-55): tmp = (y - z) * t else: tmp = x * (z + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -6.5e-93) || !(t <= 1.3e-55)) tmp = Float64(Float64(y - z) * t); else tmp = Float64(x * Float64(z + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -6.5e-93) || ~((t <= 1.3e-55))) tmp = (y - z) * t; else tmp = x * (z + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -6.5e-93], N[Not[LessEqual[t, 1.3e-55]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-93} \lor \neg \left(t \leq 1.3 \cdot 10^{-55}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\end{array}
\end{array}
if t < -6.5e-93 or 1.2999999999999999e-55 < t Initial program 100.0%
Taylor expanded in x around 0 89.4%
+-commutative89.4%
mul-1-neg89.4%
neg-sub089.4%
associate-+l-89.4%
associate--r+89.4%
+-commutative89.4%
neg-sub089.4%
distribute-rgt-neg-in89.4%
mul-1-neg89.4%
fma-def94.7%
mul-1-neg94.7%
distribute-rgt-neg-in94.7%
neg-sub094.7%
+-commutative94.7%
associate--r+94.7%
associate-+l-94.7%
neg-sub094.7%
mul-1-neg94.7%
+-commutative94.7%
mul-1-neg94.7%
Simplified94.7%
Taylor expanded in t around inf 68.8%
if -6.5e-93 < t < 1.2999999999999999e-55Initial program 100.0%
Taylor expanded in x around inf 85.2%
mul-1-neg85.2%
unsub-neg85.2%
Simplified85.2%
Taylor expanded in y around 0 59.5%
+-commutative59.5%
Simplified59.5%
Final simplification65.0%
(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 (if (or (<= z -2.3e+19) (not (<= z 0.0106))) (* z x) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.3e+19) || !(z <= 0.0106)) {
tmp = z * x;
} 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 ((z <= (-2.3d+19)) .or. (.not. (z <= 0.0106d0))) then
tmp = z * x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.3e+19) || !(z <= 0.0106)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.3e+19) or not (z <= 0.0106): tmp = z * x else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.3e+19) || !(z <= 0.0106)) tmp = Float64(z * x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.3e+19) || ~((z <= 0.0106))) tmp = z * x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.3e+19], N[Not[LessEqual[z, 0.0106]], $MachinePrecision]], N[(z * x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+19} \lor \neg \left(z \leq 0.0106\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.3e19 or 0.0106 < z Initial program 100.0%
Taylor expanded in x around 0 91.4%
+-commutative91.4%
mul-1-neg91.4%
neg-sub091.4%
associate-+l-91.4%
associate--r+91.4%
+-commutative91.4%
neg-sub091.4%
distribute-rgt-neg-in91.4%
mul-1-neg91.4%
fma-def94.5%
mul-1-neg94.5%
distribute-rgt-neg-in94.5%
neg-sub094.5%
+-commutative94.5%
associate--r+94.5%
associate-+l-94.5%
neg-sub094.5%
mul-1-neg94.5%
+-commutative94.5%
mul-1-neg94.5%
Simplified94.5%
Taylor expanded in z around inf 85.5%
Taylor expanded in t around 0 45.9%
if -2.3e19 < z < 0.0106Initial program 100.0%
Taylor expanded in y around inf 87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y around 0 30.5%
Final simplification38.3%
(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 y around inf 59.3%
*-commutative59.3%
Simplified59.3%
Taylor expanded in y around 0 16.8%
Final simplification16.8%
(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 2024011
(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))))