
(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 15 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-define100.0%
Simplified100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -7600000000000.0)
t_1
(if (<= z -2.45e-114)
(* y (- x))
(if (<= z 5e-48)
x
(if (<= z 5e+44) (* y t) (if (<= z 3.7e+210) (* z x) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -7600000000000.0) {
tmp = t_1;
} else if (z <= -2.45e-114) {
tmp = y * -x;
} else if (z <= 5e-48) {
tmp = x;
} else if (z <= 5e+44) {
tmp = y * t;
} else if (z <= 3.7e+210) {
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 <= (-7600000000000.0d0)) then
tmp = t_1
else if (z <= (-2.45d-114)) then
tmp = y * -x
else if (z <= 5d-48) then
tmp = x
else if (z <= 5d+44) then
tmp = y * t
else if (z <= 3.7d+210) 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 <= -7600000000000.0) {
tmp = t_1;
} else if (z <= -2.45e-114) {
tmp = y * -x;
} else if (z <= 5e-48) {
tmp = x;
} else if (z <= 5e+44) {
tmp = y * t;
} else if (z <= 3.7e+210) {
tmp = z * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -7600000000000.0: tmp = t_1 elif z <= -2.45e-114: tmp = y * -x elif z <= 5e-48: tmp = x elif z <= 5e+44: tmp = y * t elif z <= 3.7e+210: 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 <= -7600000000000.0) tmp = t_1; elseif (z <= -2.45e-114) tmp = Float64(y * Float64(-x)); elseif (z <= 5e-48) tmp = x; elseif (z <= 5e+44) tmp = Float64(y * t); elseif (z <= 3.7e+210) 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 <= -7600000000000.0) tmp = t_1; elseif (z <= -2.45e-114) tmp = y * -x; elseif (z <= 5e-48) tmp = x; elseif (z <= 5e+44) tmp = y * t; elseif (z <= 3.7e+210) 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, -7600000000000.0], t$95$1, If[LessEqual[z, -2.45e-114], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 5e-48], x, If[LessEqual[z, 5e+44], N[(y * t), $MachinePrecision], If[LessEqual[z, 3.7e+210], N[(z * x), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -7600000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.45 \cdot 10^{-114}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+44}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+210}:\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.6e12 or 3.69999999999999998e210 < z Initial program 100.0%
Taylor expanded in t around inf 60.8%
Taylor expanded in y around 0 53.5%
mul-1-neg53.5%
unsub-neg53.5%
*-commutative53.5%
Simplified53.5%
Taylor expanded in x around 0 53.6%
mul-1-neg53.6%
*-commutative53.6%
distribute-rgt-neg-out53.6%
Simplified53.6%
if -7.6e12 < z < -2.4499999999999999e-114Initial program 100.0%
Taylor expanded in x around inf 54.4%
mul-1-neg54.4%
unsub-neg54.4%
Simplified54.4%
Taylor expanded in y around inf 48.3%
neg-mul-148.3%
Simplified48.3%
if -2.4499999999999999e-114 < z < 4.9999999999999999e-48Initial program 99.9%
Taylor expanded in t around inf 83.3%
Taylor expanded in x around inf 47.7%
if 4.9999999999999999e-48 < z < 4.9999999999999996e44Initial program 99.9%
Taylor expanded in t around inf 66.1%
Taylor expanded in t around inf 64.6%
Taylor expanded in y around inf 45.7%
if 4.9999999999999996e44 < z < 3.69999999999999998e210Initial program 100.0%
Taylor expanded in x around inf 69.1%
mul-1-neg69.1%
unsub-neg69.1%
Simplified69.1%
Taylor expanded in z around inf 52.5%
Final simplification50.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))) (t_2 (* y (- t x))))
(if (<= z -8200000000000.0)
t_1
(if (<= z -5.2e-278)
t_2
(if (<= z 3.8e-49) (* x (- 1.0 y)) (if (<= z 1e-6) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double t_2 = y * (t - x);
double tmp;
if (z <= -8200000000000.0) {
tmp = t_1;
} else if (z <= -5.2e-278) {
tmp = t_2;
} else if (z <= 3.8e-49) {
tmp = x * (1.0 - y);
} else if (z <= 1e-6) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (x - t)
t_2 = y * (t - x)
if (z <= (-8200000000000.0d0)) then
tmp = t_1
else if (z <= (-5.2d-278)) then
tmp = t_2
else if (z <= 3.8d-49) then
tmp = x * (1.0d0 - y)
else if (z <= 1d-6) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double t_2 = y * (t - x);
double tmp;
if (z <= -8200000000000.0) {
tmp = t_1;
} else if (z <= -5.2e-278) {
tmp = t_2;
} else if (z <= 3.8e-49) {
tmp = x * (1.0 - y);
} else if (z <= 1e-6) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) t_2 = y * (t - x) tmp = 0 if z <= -8200000000000.0: tmp = t_1 elif z <= -5.2e-278: tmp = t_2 elif z <= 3.8e-49: tmp = x * (1.0 - y) elif z <= 1e-6: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) t_2 = Float64(y * Float64(t - x)) tmp = 0.0 if (z <= -8200000000000.0) tmp = t_1; elseif (z <= -5.2e-278) tmp = t_2; elseif (z <= 3.8e-49) tmp = Float64(x * Float64(1.0 - y)); elseif (z <= 1e-6) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); t_2 = y * (t - x); tmp = 0.0; if (z <= -8200000000000.0) tmp = t_1; elseif (z <= -5.2e-278) tmp = t_2; elseif (z <= 3.8e-49) tmp = x * (1.0 - y); elseif (z <= 1e-6) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8200000000000.0], t$95$1, If[LessEqual[z, -5.2e-278], t$95$2, If[LessEqual[z, 3.8e-49], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-6], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := y \cdot \left(t - x\right)\\
\mathbf{if}\;z \leq -8200000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-278}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-49}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{elif}\;z \leq 10^{-6}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.2e12 or 9.99999999999999955e-7 < z Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in97.7%
Applied egg-rr97.7%
Taylor expanded in t around 0 96.3%
associate-+r+96.3%
*-rgt-identity96.3%
mul-1-neg96.3%
distribute-rgt-neg-in96.3%
distribute-lft-in96.3%
sub-neg96.3%
+-commutative96.3%
mul-1-neg96.3%
sub-neg96.3%
fma-define98.5%
Simplified98.5%
Taylor expanded in z around inf 81.2%
neg-mul-181.2%
unsub-neg81.2%
Simplified81.2%
if -8.2e12 < z < -5.1999999999999997e-278 or 3.7999999999999997e-49 < z < 9.99999999999999955e-7Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in98.4%
Applied egg-rr98.4%
Taylor expanded in t around 0 96.9%
associate-+r+96.9%
*-rgt-identity96.9%
mul-1-neg96.9%
distribute-rgt-neg-in96.9%
distribute-lft-in96.9%
sub-neg96.9%
+-commutative96.9%
mul-1-neg96.9%
sub-neg96.9%
fma-define96.9%
Simplified96.9%
Taylor expanded in y around inf 68.1%
neg-mul-168.1%
unsub-neg68.1%
Simplified68.1%
if -5.1999999999999997e-278 < z < 3.7999999999999997e-49Initial program 99.9%
Taylor expanded in x around inf 69.9%
mul-1-neg69.9%
unsub-neg69.9%
Simplified69.9%
Taylor expanded in z around 0 69.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -4e+23)
(* z x)
(if (<= z -7.4e-115)
(* y (- x))
(if (<= z 2.35e-49) x (if (<= z 6.2e+44) (* y t) (* z x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4e+23) {
tmp = z * x;
} else if (z <= -7.4e-115) {
tmp = y * -x;
} else if (z <= 2.35e-49) {
tmp = x;
} else if (z <= 6.2e+44) {
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 <= (-4d+23)) then
tmp = z * x
else if (z <= (-7.4d-115)) then
tmp = y * -x
else if (z <= 2.35d-49) then
tmp = x
else if (z <= 6.2d+44) 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 <= -4e+23) {
tmp = z * x;
} else if (z <= -7.4e-115) {
tmp = y * -x;
} else if (z <= 2.35e-49) {
tmp = x;
} else if (z <= 6.2e+44) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4e+23: tmp = z * x elif z <= -7.4e-115: tmp = y * -x elif z <= 2.35e-49: tmp = x elif z <= 6.2e+44: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4e+23) tmp = Float64(z * x); elseif (z <= -7.4e-115) tmp = Float64(y * Float64(-x)); elseif (z <= 2.35e-49) tmp = x; elseif (z <= 6.2e+44) 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 <= -4e+23) tmp = z * x; elseif (z <= -7.4e-115) tmp = y * -x; elseif (z <= 2.35e-49) tmp = x; elseif (z <= 6.2e+44) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4e+23], N[(z * x), $MachinePrecision], If[LessEqual[z, -7.4e-115], N[(y * (-x)), $MachinePrecision], If[LessEqual[z, 2.35e-49], x, If[LessEqual[z, 6.2e+44], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+23}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -7.4 \cdot 10^{-115}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-49}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+44}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -3.9999999999999997e23 or 6.19999999999999991e44 < z Initial program 100.0%
Taylor expanded in x around inf 51.6%
mul-1-neg51.6%
unsub-neg51.6%
Simplified51.6%
Taylor expanded in z around inf 44.5%
if -3.9999999999999997e23 < z < -7.4e-115Initial program 100.0%
Taylor expanded in x around inf 51.7%
mul-1-neg51.7%
unsub-neg51.7%
Simplified51.7%
Taylor expanded in y around inf 46.3%
neg-mul-146.3%
Simplified46.3%
if -7.4e-115 < z < 2.35000000000000011e-49Initial program 99.9%
Taylor expanded in t around inf 83.3%
Taylor expanded in x around inf 47.7%
if 2.35000000000000011e-49 < z < 6.19999999999999991e44Initial program 99.9%
Taylor expanded in t around inf 66.1%
Taylor expanded in t around inf 64.6%
Taylor expanded in y around inf 45.7%
Final simplification45.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -2.6e+67)
(* z x)
(if (<= z -4.2e-278)
(* y t)
(if (<= z 5e-48) x (if (<= z 3.6e+45) (* y t) (* z x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.6e+67) {
tmp = z * x;
} else if (z <= -4.2e-278) {
tmp = y * t;
} else if (z <= 5e-48) {
tmp = x;
} else if (z <= 3.6e+45) {
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.6d+67)) then
tmp = z * x
else if (z <= (-4.2d-278)) then
tmp = y * t
else if (z <= 5d-48) then
tmp = x
else if (z <= 3.6d+45) 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.6e+67) {
tmp = z * x;
} else if (z <= -4.2e-278) {
tmp = y * t;
} else if (z <= 5e-48) {
tmp = x;
} else if (z <= 3.6e+45) {
tmp = y * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.6e+67: tmp = z * x elif z <= -4.2e-278: tmp = y * t elif z <= 5e-48: tmp = x elif z <= 3.6e+45: tmp = y * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.6e+67) tmp = Float64(z * x); elseif (z <= -4.2e-278) tmp = Float64(y * t); elseif (z <= 5e-48) tmp = x; elseif (z <= 3.6e+45) 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.6e+67) tmp = z * x; elseif (z <= -4.2e-278) tmp = y * t; elseif (z <= 5e-48) tmp = x; elseif (z <= 3.6e+45) tmp = y * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.6e+67], N[(z * x), $MachinePrecision], If[LessEqual[z, -4.2e-278], N[(y * t), $MachinePrecision], If[LessEqual[z, 5e-48], x, If[LessEqual[z, 3.6e+45], N[(y * t), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+67}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-278}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+45}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if z < -2.6e67 or 3.6e45 < z Initial program 100.0%
Taylor expanded in x around inf 53.5%
mul-1-neg53.5%
unsub-neg53.5%
Simplified53.5%
Taylor expanded in z around inf 46.5%
if -2.6e67 < z < -4.20000000000000027e-278 or 4.9999999999999999e-48 < z < 3.6e45Initial program 100.0%
Taylor expanded in t around inf 70.0%
Taylor expanded in t around inf 70.5%
Taylor expanded in y around inf 37.1%
if -4.20000000000000027e-278 < z < 4.9999999999999999e-48Initial program 99.9%
Taylor expanded in t around inf 87.1%
Taylor expanded in x around inf 57.1%
Final simplification45.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -1.05e+14)
t_1
(if (<= z -3.7e-114) (* y (- t x)) (if (<= z 0.015) (+ x (* y t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= -3.7e-114) {
tmp = y * (t - x);
} else if (z <= 0.015) {
tmp = x + (y * t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * (x - t)
if (z <= (-1.05d+14)) then
tmp = t_1
else if (z <= (-3.7d-114)) then
tmp = y * (t - x)
else if (z <= 0.015d0) then
tmp = x + (y * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= -3.7e-114) {
tmp = y * (t - x);
} else if (z <= 0.015) {
tmp = x + (y * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -1.05e+14: tmp = t_1 elif z <= -3.7e-114: tmp = y * (t - x) elif z <= 0.015: tmp = x + (y * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -1.05e+14) tmp = t_1; elseif (z <= -3.7e-114) tmp = Float64(y * Float64(t - x)); elseif (z <= 0.015) tmp = Float64(x + Float64(y * t)); 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 <= -1.05e+14) tmp = t_1; elseif (z <= -3.7e-114) tmp = y * (t - x); elseif (z <= 0.015) tmp = x + (y * t); 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, -1.05e+14], t$95$1, If[LessEqual[z, -3.7e-114], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.015], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-114}:\\
\;\;\;\;y \cdot \left(t - x\right)\\
\mathbf{elif}\;z \leq 0.015:\\
\;\;\;\;x + y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.05e14 or 0.014999999999999999 < z Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in97.7%
Applied egg-rr97.7%
Taylor expanded in t around 0 96.2%
associate-+r+96.2%
*-rgt-identity96.2%
mul-1-neg96.2%
distribute-rgt-neg-in96.2%
distribute-lft-in96.2%
sub-neg96.2%
+-commutative96.2%
mul-1-neg96.2%
sub-neg96.2%
fma-define98.4%
Simplified98.4%
Taylor expanded in z around inf 82.2%
neg-mul-182.2%
unsub-neg82.2%
Simplified82.2%
if -1.05e14 < z < -3.69999999999999965e-114Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in94.1%
Applied egg-rr94.1%
Taylor expanded in t around 0 88.2%
associate-+r+88.2%
*-rgt-identity88.2%
mul-1-neg88.2%
distribute-rgt-neg-in88.2%
distribute-lft-in88.1%
sub-neg88.1%
+-commutative88.1%
mul-1-neg88.1%
sub-neg88.1%
fma-define88.1%
Simplified88.1%
Taylor expanded in y around inf 83.2%
neg-mul-183.2%
unsub-neg83.2%
Simplified83.2%
if -3.69999999999999965e-114 < z < 0.014999999999999999Initial program 100.0%
Taylor expanded in t around inf 81.8%
Taylor expanded in z around 0 74.7%
*-commutative74.7%
Simplified74.7%
(FPCore (x y z t) :precision binary64 (if (or (<= t -8.8e-81) (not (<= t 2.1e-97))) (+ x (* (- y z) t)) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -8.8e-81) || !(t <= 2.1e-97)) {
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 <= (-8.8d-81)) .or. (.not. (t <= 2.1d-97))) 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 <= -8.8e-81) || !(t <= 2.1e-97)) {
tmp = x + ((y - z) * t);
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -8.8e-81) or not (t <= 2.1e-97): 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 <= -8.8e-81) || !(t <= 2.1e-97)) 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 <= -8.8e-81) || ~((t <= 2.1e-97))) 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, -8.8e-81], N[Not[LessEqual[t, 2.1e-97]], $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 -8.8 \cdot 10^{-81} \lor \neg \left(t \leq 2.1 \cdot 10^{-97}\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 < -8.7999999999999997e-81 or 2.1000000000000001e-97 < t Initial program 100.0%
Taylor expanded in t around inf 86.0%
if -8.7999999999999997e-81 < t < 2.1000000000000001e-97Initial program 99.9%
Taylor expanded in x around inf 89.5%
mul-1-neg89.5%
unsub-neg89.5%
Simplified89.5%
Final simplification87.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -7600000000000.0) (not (<= z 0.112))) (* z (- x t)) (- x (* y (- x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7600000000000.0) || !(z <= 0.112)) {
tmp = z * (x - t);
} else {
tmp = x - (y * (x - t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-7600000000000.0d0)) .or. (.not. (z <= 0.112d0))) then
tmp = z * (x - t)
else
tmp = x - (y * (x - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -7600000000000.0) || !(z <= 0.112)) {
tmp = z * (x - t);
} else {
tmp = x - (y * (x - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -7600000000000.0) or not (z <= 0.112): tmp = z * (x - t) else: tmp = x - (y * (x - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -7600000000000.0) || !(z <= 0.112)) tmp = Float64(z * Float64(x - t)); else tmp = Float64(x - Float64(y * Float64(x - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -7600000000000.0) || ~((z <= 0.112))) tmp = z * (x - t); else tmp = x - (y * (x - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -7600000000000.0], N[Not[LessEqual[z, 0.112]], $MachinePrecision]], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7600000000000 \lor \neg \left(z \leq 0.112\right):\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \left(x - t\right)\\
\end{array}
\end{array}
if z < -7.6e12 or 0.112000000000000002 < z Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in97.7%
Applied egg-rr97.7%
Taylor expanded in t around 0 96.2%
associate-+r+96.2%
*-rgt-identity96.2%
mul-1-neg96.2%
distribute-rgt-neg-in96.2%
distribute-lft-in96.2%
sub-neg96.2%
+-commutative96.2%
mul-1-neg96.2%
sub-neg96.2%
fma-define98.4%
Simplified98.4%
Taylor expanded in z around inf 82.2%
neg-mul-182.2%
unsub-neg82.2%
Simplified82.2%
if -7.6e12 < z < 0.112000000000000002Initial program 100.0%
Taylor expanded in y around inf 91.0%
*-commutative91.0%
Simplified91.0%
Final simplification86.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -4.4e+56) (not (<= t 1e+87))) (* (- y z) t) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.4e+56) || !(t <= 1e+87)) {
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 <= (-4.4d+56)) .or. (.not. (t <= 1d+87))) 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 <= -4.4e+56) || !(t <= 1e+87)) {
tmp = (y - z) * t;
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -4.4e+56) or not (t <= 1e+87): tmp = (y - z) * t else: tmp = x * ((z - y) + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -4.4e+56) || !(t <= 1e+87)) 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 <= -4.4e+56) || ~((t <= 1e+87))) 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, -4.4e+56], N[Not[LessEqual[t, 1e+87]], $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 -4.4 \cdot 10^{+56} \lor \neg \left(t \leq 10^{+87}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\end{array}
\end{array}
if t < -4.40000000000000032e56 or 9.9999999999999996e86 < t Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in96.7%
Applied egg-rr96.7%
Taylor expanded in t around 0 93.6%
associate-+r+93.6%
*-rgt-identity93.6%
mul-1-neg93.6%
distribute-rgt-neg-in93.6%
distribute-lft-in93.6%
sub-neg93.6%
+-commutative93.6%
mul-1-neg93.6%
sub-neg93.6%
fma-define96.8%
Simplified96.8%
Taylor expanded in x around 0 88.6%
if -4.40000000000000032e56 < t < 9.9999999999999996e86Initial program 100.0%
Taylor expanded in x around inf 77.0%
mul-1-neg77.0%
unsub-neg77.0%
Simplified77.0%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (<= t -1.15e-85) (* t (- (+ y (/ x t)) z)) (if (<= t 4.4e-99) (* x (+ (- z y) 1.0)) (+ x (* (- y z) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.15e-85) {
tmp = t * ((y + (x / t)) - z);
} else if (t <= 4.4e-99) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x + ((y - 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 (t <= (-1.15d-85)) then
tmp = t * ((y + (x / t)) - z)
else if (t <= 4.4d-99) then
tmp = x * ((z - y) + 1.0d0)
else
tmp = x + ((y - z) * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.15e-85) {
tmp = t * ((y + (x / t)) - z);
} else if (t <= 4.4e-99) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x + ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.15e-85: tmp = t * ((y + (x / t)) - z) elif t <= 4.4e-99: tmp = x * ((z - y) + 1.0) else: tmp = x + ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.15e-85) tmp = Float64(t * Float64(Float64(y + Float64(x / t)) - z)); elseif (t <= 4.4e-99) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); else tmp = Float64(x + Float64(Float64(y - z) * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.15e-85) tmp = t * ((y + (x / t)) - z); elseif (t <= 4.4e-99) tmp = x * ((z - y) + 1.0); else tmp = x + ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.15e-85], N[(t * N[(N[(y + N[(x / t), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e-99], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-85}:\\
\;\;\;\;t \cdot \left(\left(y + \frac{x}{t}\right) - z\right)\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-99}:\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\\
\end{array}
\end{array}
if t < -1.15e-85Initial program 100.0%
Taylor expanded in t around inf 86.7%
Taylor expanded in t around inf 89.1%
if -1.15e-85 < t < 4.40000000000000009e-99Initial program 99.9%
Taylor expanded in x around inf 89.5%
mul-1-neg89.5%
unsub-neg89.5%
Simplified89.5%
if 4.40000000000000009e-99 < t Initial program 100.0%
Taylor expanded in t around inf 85.4%
Final simplification88.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.6e-46) (not (<= t 4.5e-57))) (* (- y z) t) (* x (+ z 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.6e-46) || !(t <= 4.5e-57)) {
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 <= (-3.6d-46)) .or. (.not. (t <= 4.5d-57))) 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 <= -3.6e-46) || !(t <= 4.5e-57)) {
tmp = (y - z) * t;
} else {
tmp = x * (z + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.6e-46) or not (t <= 4.5e-57): tmp = (y - z) * t else: tmp = x * (z + 1.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.6e-46) || !(t <= 4.5e-57)) 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 <= -3.6e-46) || ~((t <= 4.5e-57))) tmp = (y - z) * t; else tmp = x * (z + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.6e-46], N[Not[LessEqual[t, 4.5e-57]], $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 -3.6 \cdot 10^{-46} \lor \neg \left(t \leq 4.5 \cdot 10^{-57}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\end{array}
\end{array}
if t < -3.6e-46 or 4.49999999999999973e-57 < t Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in97.9%
Applied egg-rr97.9%
Taylor expanded in t around 0 95.9%
associate-+r+95.9%
*-rgt-identity95.9%
mul-1-neg95.9%
distribute-rgt-neg-in95.9%
distribute-lft-in95.9%
sub-neg95.9%
+-commutative95.9%
mul-1-neg95.9%
sub-neg95.9%
fma-define97.9%
Simplified97.9%
Taylor expanded in x around 0 73.2%
if -3.6e-46 < t < 4.49999999999999973e-57Initial program 99.9%
Taylor expanded in x around inf 86.9%
mul-1-neg86.9%
unsub-neg86.9%
Simplified86.9%
Taylor expanded in y around 0 65.9%
+-commutative65.9%
Simplified65.9%
Final simplification70.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3e-118) (not (<= t 4.4e-130))) (* (- y z) t) (* z x)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3e-118) || !(t <= 4.4e-130)) {
tmp = (y - z) * 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 ((t <= (-3d-118)) .or. (.not. (t <= 4.4d-130))) then
tmp = (y - z) * 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 ((t <= -3e-118) || !(t <= 4.4e-130)) {
tmp = (y - z) * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3e-118) or not (t <= 4.4e-130): tmp = (y - z) * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3e-118) || !(t <= 4.4e-130)) tmp = Float64(Float64(y - z) * t); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3e-118) || ~((t <= 4.4e-130))) tmp = (y - z) * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3e-118], N[Not[LessEqual[t, 4.4e-130]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(z * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-118} \lor \neg \left(t \leq 4.4 \cdot 10^{-130}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if t < -3.00000000000000018e-118 or 4.3999999999999997e-130 < t Initial program 100.0%
*-commutative100.0%
sub-neg100.0%
distribute-lft-in98.2%
Applied egg-rr98.2%
Taylor expanded in t around 0 96.5%
associate-+r+96.5%
*-rgt-identity96.5%
mul-1-neg96.5%
distribute-rgt-neg-in96.5%
distribute-lft-in96.5%
sub-neg96.5%
+-commutative96.5%
mul-1-neg96.5%
sub-neg96.5%
fma-define98.2%
Simplified98.2%
Taylor expanded in x around 0 67.2%
if -3.00000000000000018e-118 < t < 4.3999999999999997e-130Initial program 100.0%
Taylor expanded in x around inf 93.3%
mul-1-neg93.3%
unsub-neg93.3%
Simplified93.3%
Taylor expanded in z around inf 45.8%
Final simplification60.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.02e-140) (not (<= y 4.8e-43))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.02e-140) || !(y <= 4.8e-43)) {
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 <= (-1.02d-140)) .or. (.not. (y <= 4.8d-43))) 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 <= -1.02e-140) || !(y <= 4.8e-43)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.02e-140) or not (y <= 4.8e-43): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.02e-140) || !(y <= 4.8e-43)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.02e-140) || ~((y <= 4.8e-43))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.02e-140], N[Not[LessEqual[y, 4.8e-43]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{-140} \lor \neg \left(y \leq 4.8 \cdot 10^{-43}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.01999999999999995e-140 or 4.8000000000000004e-43 < y Initial program 99.9%
Taylor expanded in t around inf 60.1%
Taylor expanded in t around inf 65.1%
Taylor expanded in y around inf 36.3%
if -1.01999999999999995e-140 < y < 4.8000000000000004e-43Initial program 100.0%
Taylor expanded in t around inf 74.0%
Taylor expanded in x around inf 38.7%
Final simplification37.3%
(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%
(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 66.0%
Taylor expanded in x around inf 20.2%
(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 2024157
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:alt
(! :herbie-platform default (+ x (+ (* t (- y z)) (* (- x) (- y z)))))
(+ x (* (- y z) (- t x))))