
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
(FPCore (x y z t) :precision binary64 (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 (* x (- 1.0 y))) (t_2 (* z (- t))))
(if (<= t -3.2e+94)
t_2
(if (<= t -6.1e+26)
(* y t)
(if (<= t -1.45e+18)
t_2
(if (<= t 1.55e-218)
t_1
(if (<= t 1.6e-173)
(* x (+ z 1.0))
(if (<= t 3.65e+25) t_1 (if (<= t 5.2e+190) t_2 (* y t))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - y);
double t_2 = z * -t;
double tmp;
if (t <= -3.2e+94) {
tmp = t_2;
} else if (t <= -6.1e+26) {
tmp = y * t;
} else if (t <= -1.45e+18) {
tmp = t_2;
} else if (t <= 1.55e-218) {
tmp = t_1;
} else if (t <= 1.6e-173) {
tmp = x * (z + 1.0);
} else if (t <= 3.65e+25) {
tmp = t_1;
} else if (t <= 5.2e+190) {
tmp = t_2;
} else {
tmp = y * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (1.0d0 - y)
t_2 = z * -t
if (t <= (-3.2d+94)) then
tmp = t_2
else if (t <= (-6.1d+26)) then
tmp = y * t
else if (t <= (-1.45d+18)) then
tmp = t_2
else if (t <= 1.55d-218) then
tmp = t_1
else if (t <= 1.6d-173) then
tmp = x * (z + 1.0d0)
else if (t <= 3.65d+25) then
tmp = t_1
else if (t <= 5.2d+190) then
tmp = t_2
else
tmp = y * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - y);
double t_2 = z * -t;
double tmp;
if (t <= -3.2e+94) {
tmp = t_2;
} else if (t <= -6.1e+26) {
tmp = y * t;
} else if (t <= -1.45e+18) {
tmp = t_2;
} else if (t <= 1.55e-218) {
tmp = t_1;
} else if (t <= 1.6e-173) {
tmp = x * (z + 1.0);
} else if (t <= 3.65e+25) {
tmp = t_1;
} else if (t <= 5.2e+190) {
tmp = t_2;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - y) t_2 = z * -t tmp = 0 if t <= -3.2e+94: tmp = t_2 elif t <= -6.1e+26: tmp = y * t elif t <= -1.45e+18: tmp = t_2 elif t <= 1.55e-218: tmp = t_1 elif t <= 1.6e-173: tmp = x * (z + 1.0) elif t <= 3.65e+25: tmp = t_1 elif t <= 5.2e+190: tmp = t_2 else: tmp = y * t return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - y)) t_2 = Float64(z * Float64(-t)) tmp = 0.0 if (t <= -3.2e+94) tmp = t_2; elseif (t <= -6.1e+26) tmp = Float64(y * t); elseif (t <= -1.45e+18) tmp = t_2; elseif (t <= 1.55e-218) tmp = t_1; elseif (t <= 1.6e-173) tmp = Float64(x * Float64(z + 1.0)); elseif (t <= 3.65e+25) tmp = t_1; elseif (t <= 5.2e+190) tmp = t_2; else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - y); t_2 = z * -t; tmp = 0.0; if (t <= -3.2e+94) tmp = t_2; elseif (t <= -6.1e+26) tmp = y * t; elseif (t <= -1.45e+18) tmp = t_2; elseif (t <= 1.55e-218) tmp = t_1; elseif (t <= 1.6e-173) tmp = x * (z + 1.0); elseif (t <= 3.65e+25) tmp = t_1; elseif (t <= 5.2e+190) tmp = t_2; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[t, -3.2e+94], t$95$2, If[LessEqual[t, -6.1e+26], N[(y * t), $MachinePrecision], If[LessEqual[t, -1.45e+18], t$95$2, If[LessEqual[t, 1.55e-218], t$95$1, If[LessEqual[t, 1.6e-173], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.65e+25], t$95$1, If[LessEqual[t, 5.2e+190], t$95$2, N[(y * t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - y\right)\\
t_2 := z \cdot \left(-t\right)\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{+94}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -6.1 \cdot 10^{+26}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{+18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-218}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-173}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;t \leq 3.65 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+190}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if t < -3.20000000000000014e94 or -6.1000000000000003e26 < t < -1.45e18 or 3.6499999999999998e25 < t < 5.20000000000000022e190Initial program 99.9%
Taylor expanded in t around inf 90.1%
Taylor expanded in y around 0 58.8%
associate-*r*58.8%
mul-1-neg58.8%
Simplified58.8%
Taylor expanded in x around 0 55.6%
associate-*r*55.6%
mul-1-neg55.6%
Simplified55.6%
if -3.20000000000000014e94 < t < -6.1000000000000003e26 or 5.20000000000000022e190 < t Initial program 100.0%
Taylor expanded in y around inf 72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in y around inf 72.2%
Taylor expanded in t around inf 66.7%
*-commutative66.7%
Simplified66.7%
if -1.45e18 < t < 1.54999999999999999e-218 or 1.6e-173 < t < 3.6499999999999998e25Initial program 99.9%
Taylor expanded in x around inf 76.9%
mul-1-neg76.9%
unsub-neg76.9%
Simplified76.9%
Taylor expanded in z around 0 59.9%
if 1.54999999999999999e-218 < t < 1.6e-173Initial program 100.0%
Taylor expanded in x around inf 89.5%
mul-1-neg89.5%
unsub-neg89.5%
Simplified89.5%
Taylor expanded in y around 0 87.6%
+-commutative87.6%
Simplified87.6%
Final simplification60.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ z 1.0))) (t_2 (* z (- t))))
(if (<= t -2.7e+93)
t_2
(if (<= t -3.4e+25)
(* y t)
(if (<= t -0.00029)
t_2
(if (<= t -6e-95)
t_1
(if (<= t -7e-209)
(* y (- x))
(if (<= t 1.5e-34) t_1 (if (<= t 1.05e+191) t_2 (* y t))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z + 1.0);
double t_2 = z * -t;
double tmp;
if (t <= -2.7e+93) {
tmp = t_2;
} else if (t <= -3.4e+25) {
tmp = y * t;
} else if (t <= -0.00029) {
tmp = t_2;
} else if (t <= -6e-95) {
tmp = t_1;
} else if (t <= -7e-209) {
tmp = y * -x;
} else if (t <= 1.5e-34) {
tmp = t_1;
} else if (t <= 1.05e+191) {
tmp = t_2;
} else {
tmp = y * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (z + 1.0d0)
t_2 = z * -t
if (t <= (-2.7d+93)) then
tmp = t_2
else if (t <= (-3.4d+25)) then
tmp = y * t
else if (t <= (-0.00029d0)) then
tmp = t_2
else if (t <= (-6d-95)) then
tmp = t_1
else if (t <= (-7d-209)) then
tmp = y * -x
else if (t <= 1.5d-34) then
tmp = t_1
else if (t <= 1.05d+191) then
tmp = t_2
else
tmp = y * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (z + 1.0);
double t_2 = z * -t;
double tmp;
if (t <= -2.7e+93) {
tmp = t_2;
} else if (t <= -3.4e+25) {
tmp = y * t;
} else if (t <= -0.00029) {
tmp = t_2;
} else if (t <= -6e-95) {
tmp = t_1;
} else if (t <= -7e-209) {
tmp = y * -x;
} else if (t <= 1.5e-34) {
tmp = t_1;
} else if (t <= 1.05e+191) {
tmp = t_2;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z + 1.0) t_2 = z * -t tmp = 0 if t <= -2.7e+93: tmp = t_2 elif t <= -3.4e+25: tmp = y * t elif t <= -0.00029: tmp = t_2 elif t <= -6e-95: tmp = t_1 elif t <= -7e-209: tmp = y * -x elif t <= 1.5e-34: tmp = t_1 elif t <= 1.05e+191: tmp = t_2 else: tmp = y * t return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z + 1.0)) t_2 = Float64(z * Float64(-t)) tmp = 0.0 if (t <= -2.7e+93) tmp = t_2; elseif (t <= -3.4e+25) tmp = Float64(y * t); elseif (t <= -0.00029) tmp = t_2; elseif (t <= -6e-95) tmp = t_1; elseif (t <= -7e-209) tmp = Float64(y * Float64(-x)); elseif (t <= 1.5e-34) tmp = t_1; elseif (t <= 1.05e+191) tmp = t_2; else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z + 1.0); t_2 = z * -t; tmp = 0.0; if (t <= -2.7e+93) tmp = t_2; elseif (t <= -3.4e+25) tmp = y * t; elseif (t <= -0.00029) tmp = t_2; elseif (t <= -6e-95) tmp = t_1; elseif (t <= -7e-209) tmp = y * -x; elseif (t <= 1.5e-34) tmp = t_1; elseif (t <= 1.05e+191) tmp = t_2; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * (-t)), $MachinePrecision]}, If[LessEqual[t, -2.7e+93], t$95$2, If[LessEqual[t, -3.4e+25], N[(y * t), $MachinePrecision], If[LessEqual[t, -0.00029], t$95$2, If[LessEqual[t, -6e-95], t$95$1, If[LessEqual[t, -7e-209], N[(y * (-x)), $MachinePrecision], If[LessEqual[t, 1.5e-34], t$95$1, If[LessEqual[t, 1.05e+191], t$95$2, N[(y * t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(z + 1\right)\\
t_2 := z \cdot \left(-t\right)\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+93}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{+25}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;t \leq -0.00029:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-209}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+191}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if t < -2.6999999999999999e93 or -3.39999999999999984e25 < t < -2.9e-4 or 1.5e-34 < t < 1.05e191Initial program 99.9%
Taylor expanded in t around inf 86.4%
Taylor expanded in y around 0 56.3%
associate-*r*56.3%
mul-1-neg56.3%
Simplified56.3%
Taylor expanded in x around 0 51.6%
associate-*r*51.6%
mul-1-neg51.6%
Simplified51.6%
if -2.6999999999999999e93 < t < -3.39999999999999984e25 or 1.05e191 < t Initial program 100.0%
Taylor expanded in y around inf 72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in y around inf 72.2%
Taylor expanded in t around inf 66.7%
*-commutative66.7%
Simplified66.7%
if -2.9e-4 < t < -6e-95 or -7.00000000000000004e-209 < t < 1.5e-34Initial program 99.9%
Taylor expanded in x around inf 83.8%
mul-1-neg83.8%
unsub-neg83.8%
Simplified83.8%
Taylor expanded in y around 0 52.3%
+-commutative52.3%
Simplified52.3%
if -6e-95 < t < -7.00000000000000004e-209Initial program 100.0%
Taylor expanded in x around inf 69.4%
mul-1-neg69.4%
unsub-neg69.4%
Simplified69.4%
Taylor expanded in z around 0 65.3%
Taylor expanded in y around inf 49.4%
associate-*r*49.4%
neg-mul-149.4%
*-commutative49.4%
Simplified49.4%
Final simplification54.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))) (t_2 (* y (- t x))) (t_3 (* x (+ z 1.0))))
(if (<= y -5.2e-11)
t_2
(if (<= y 1.05e-201)
t_3
(if (<= y 4.6e-138)
t_1
(if (<= y 3.1e-89) t_3 (if (<= y 920000000.0) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = y * (t - x);
double t_3 = x * (z + 1.0);
double tmp;
if (y <= -5.2e-11) {
tmp = t_2;
} else if (y <= 1.05e-201) {
tmp = t_3;
} else if (y <= 4.6e-138) {
tmp = t_1;
} else if (y <= 3.1e-89) {
tmp = t_3;
} else if (y <= 920000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = z * -t
t_2 = y * (t - x)
t_3 = x * (z + 1.0d0)
if (y <= (-5.2d-11)) then
tmp = t_2
else if (y <= 1.05d-201) then
tmp = t_3
else if (y <= 4.6d-138) then
tmp = t_1
else if (y <= 3.1d-89) then
tmp = t_3
else if (y <= 920000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double t_2 = y * (t - x);
double t_3 = x * (z + 1.0);
double tmp;
if (y <= -5.2e-11) {
tmp = t_2;
} else if (y <= 1.05e-201) {
tmp = t_3;
} else if (y <= 4.6e-138) {
tmp = t_1;
} else if (y <= 3.1e-89) {
tmp = t_3;
} else if (y <= 920000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t t_2 = y * (t - x) t_3 = x * (z + 1.0) tmp = 0 if y <= -5.2e-11: tmp = t_2 elif y <= 1.05e-201: tmp = t_3 elif y <= 4.6e-138: tmp = t_1 elif y <= 3.1e-89: tmp = t_3 elif y <= 920000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) t_2 = Float64(y * Float64(t - x)) t_3 = Float64(x * Float64(z + 1.0)) tmp = 0.0 if (y <= -5.2e-11) tmp = t_2; elseif (y <= 1.05e-201) tmp = t_3; elseif (y <= 4.6e-138) tmp = t_1; elseif (y <= 3.1e-89) tmp = t_3; elseif (y <= 920000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * -t; t_2 = y * (t - x); t_3 = x * (z + 1.0); tmp = 0.0; if (y <= -5.2e-11) tmp = t_2; elseif (y <= 1.05e-201) tmp = t_3; elseif (y <= 4.6e-138) tmp = t_1; elseif (y <= 3.1e-89) tmp = t_3; elseif (y <= 920000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e-11], t$95$2, If[LessEqual[y, 1.05e-201], t$95$3, If[LessEqual[y, 4.6e-138], t$95$1, If[LessEqual[y, 3.1e-89], t$95$3, If[LessEqual[y, 920000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
t_2 := y \cdot \left(t - x\right)\\
t_3 := x \cdot \left(z + 1\right)\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{-11}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-201}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-89}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 920000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -5.2000000000000001e-11 or 9.2e8 < y Initial program 100.0%
Taylor expanded in x around inf 87.7%
+-commutative87.7%
*-commutative87.7%
*-commutative87.7%
associate-/l*88.4%
distribute-lft-out88.4%
Simplified88.4%
Taylor expanded in y around inf 73.7%
Taylor expanded in x around 0 76.3%
+-commutative76.3%
associate-*r*76.3%
neg-mul-176.3%
distribute-rgt-out79.2%
unsub-neg79.2%
Simplified79.2%
if -5.2000000000000001e-11 < y < 1.05000000000000006e-201 or 4.5999999999999998e-138 < y < 3.09999999999999996e-89Initial program 100.0%
Taylor expanded in x around inf 56.5%
mul-1-neg56.5%
unsub-neg56.5%
Simplified56.5%
Taylor expanded in y around 0 56.5%
+-commutative56.5%
Simplified56.5%
if 1.05000000000000006e-201 < y < 4.5999999999999998e-138 or 3.09999999999999996e-89 < y < 9.2e8Initial program 99.9%
Taylor expanded in t around inf 93.1%
Taylor expanded in y around 0 68.1%
associate-*r*68.1%
mul-1-neg68.1%
Simplified68.1%
Taylor expanded in x around 0 57.0%
associate-*r*57.0%
mul-1-neg57.0%
Simplified57.0%
Final simplification68.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (- x (* z t))))
(if (<= y -2.2e-11)
t_1
(if (<= y -1.55e-196)
t_2
(if (<= y -4e-252) (* z (- x t)) (if (<= y 900000000.0) 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 * t);
double tmp;
if (y <= -2.2e-11) {
tmp = t_1;
} else if (y <= -1.55e-196) {
tmp = t_2;
} else if (y <= -4e-252) {
tmp = z * (x - t);
} else if (y <= 900000000.0) {
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 * t)
if (y <= (-2.2d-11)) then
tmp = t_1
else if (y <= (-1.55d-196)) then
tmp = t_2
else if (y <= (-4d-252)) then
tmp = z * (x - t)
else if (y <= 900000000.0d0) 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 * t);
double tmp;
if (y <= -2.2e-11) {
tmp = t_1;
} else if (y <= -1.55e-196) {
tmp = t_2;
} else if (y <= -4e-252) {
tmp = z * (x - t);
} else if (y <= 900000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = x - (z * t) tmp = 0 if y <= -2.2e-11: tmp = t_1 elif y <= -1.55e-196: tmp = t_2 elif y <= -4e-252: tmp = z * (x - t) elif y <= 900000000.0: 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 * t)) tmp = 0.0 if (y <= -2.2e-11) tmp = t_1; elseif (y <= -1.55e-196) tmp = t_2; elseif (y <= -4e-252) tmp = Float64(z * Float64(x - t)); elseif (y <= 900000000.0) 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 * t); tmp = 0.0; if (y <= -2.2e-11) tmp = t_1; elseif (y <= -1.55e-196) tmp = t_2; elseif (y <= -4e-252) tmp = z * (x - t); elseif (y <= 900000000.0) 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 * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.2e-11], t$95$1, If[LessEqual[y, -1.55e-196], t$95$2, If[LessEqual[y, -4e-252], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 900000000.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := x - z \cdot t\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{-196}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-252}:\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{elif}\;y \leq 900000000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.2000000000000002e-11 or 9e8 < y Initial program 100.0%
Taylor expanded in x around inf 87.8%
+-commutative87.8%
*-commutative87.8%
*-commutative87.8%
associate-/l*88.5%
distribute-lft-out88.5%
Simplified88.5%
Taylor expanded in y around inf 73.2%
Taylor expanded in x around 0 75.8%
+-commutative75.8%
associate-*r*75.8%
neg-mul-175.8%
distribute-rgt-out78.7%
unsub-neg78.7%
Simplified78.7%
if -2.2000000000000002e-11 < y < -1.54999999999999996e-196 or -3.99999999999999977e-252 < y < 9e8Initial program 99.9%
Taylor expanded in t around inf 84.3%
Taylor expanded in y around 0 70.2%
associate-*r*70.2%
mul-1-neg70.2%
Simplified70.2%
Taylor expanded in x around 0 70.2%
mul-1-neg70.2%
sub-neg70.2%
Simplified70.2%
if -1.54999999999999996e-196 < y < -3.99999999999999977e-252Initial program 100.0%
Taylor expanded in y around 0 100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 92.1%
*-commutative92.1%
Simplified92.1%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- t x))) (t_2 (* z (- x t))))
(if (<= y -7.5e-11)
t_1
(if (<= y 5.7e-258)
t_2
(if (<= y 2.65e-207)
(* x (+ z 1.0))
(if (<= y 880000000000.0) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t - x);
double t_2 = z * (x - t);
double tmp;
if (y <= -7.5e-11) {
tmp = t_1;
} else if (y <= 5.7e-258) {
tmp = t_2;
} else if (y <= 2.65e-207) {
tmp = x * (z + 1.0);
} else if (y <= 880000000000.0) {
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 = z * (x - t)
if (y <= (-7.5d-11)) then
tmp = t_1
else if (y <= 5.7d-258) then
tmp = t_2
else if (y <= 2.65d-207) then
tmp = x * (z + 1.0d0)
else if (y <= 880000000000.0d0) 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 = z * (x - t);
double tmp;
if (y <= -7.5e-11) {
tmp = t_1;
} else if (y <= 5.7e-258) {
tmp = t_2;
} else if (y <= 2.65e-207) {
tmp = x * (z + 1.0);
} else if (y <= 880000000000.0) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t - x) t_2 = z * (x - t) tmp = 0 if y <= -7.5e-11: tmp = t_1 elif y <= 5.7e-258: tmp = t_2 elif y <= 2.65e-207: tmp = x * (z + 1.0) elif y <= 880000000000.0: 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(z * Float64(x - t)) tmp = 0.0 if (y <= -7.5e-11) tmp = t_1; elseif (y <= 5.7e-258) tmp = t_2; elseif (y <= 2.65e-207) tmp = Float64(x * Float64(z + 1.0)); elseif (y <= 880000000000.0) 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 = z * (x - t); tmp = 0.0; if (y <= -7.5e-11) tmp = t_1; elseif (y <= 5.7e-258) tmp = t_2; elseif (y <= 2.65e-207) tmp = x * (z + 1.0); elseif (y <= 880000000000.0) 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[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e-11], t$95$1, If[LessEqual[y, 5.7e-258], t$95$2, If[LessEqual[y, 2.65e-207], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 880000000000.0], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := z \cdot \left(x - t\right)\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{-258}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{-207}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\
\mathbf{elif}\;y \leq 880000000000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.5e-11 or 8.8e11 < y Initial program 100.0%
Taylor expanded in x around inf 87.7%
+-commutative87.7%
*-commutative87.7%
*-commutative87.7%
associate-/l*88.4%
distribute-lft-out88.4%
Simplified88.4%
Taylor expanded in y around inf 73.7%
Taylor expanded in x around 0 76.3%
+-commutative76.3%
associate-*r*76.3%
neg-mul-176.3%
distribute-rgt-out79.2%
unsub-neg79.2%
Simplified79.2%
if -7.5e-11 < y < 5.7000000000000002e-258 or 2.65e-207 < y < 8.8e11Initial program 99.9%
Taylor expanded in y around 0 86.8%
mul-1-neg86.8%
unsub-neg86.8%
Simplified86.8%
Taylor expanded in z around inf 63.2%
*-commutative63.2%
Simplified63.2%
if 5.7000000000000002e-258 < y < 2.65e-207Initial program 100.0%
Taylor expanded in x around inf 80.5%
mul-1-neg80.5%
unsub-neg80.5%
Simplified80.5%
Taylor expanded in y around 0 80.5%
+-commutative80.5%
Simplified80.5%
Final simplification72.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- t))))
(if (<= z -2.1e-96)
t_1
(if (<= z -2.6e-296)
(* y t)
(if (<= z 2.4e-280) x (if (<= z 2.15e+15) (* y t) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -2.1e-96) {
tmp = t_1;
} else if (z <= -2.6e-296) {
tmp = y * t;
} else if (z <= 2.4e-280) {
tmp = x;
} else if (z <= 2.15e+15) {
tmp = y * t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * -t
if (z <= (-2.1d-96)) then
tmp = t_1
else if (z <= (-2.6d-296)) then
tmp = y * t
else if (z <= 2.4d-280) then
tmp = x
else if (z <= 2.15d+15) then
tmp = y * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * -t;
double tmp;
if (z <= -2.1e-96) {
tmp = t_1;
} else if (z <= -2.6e-296) {
tmp = y * t;
} else if (z <= 2.4e-280) {
tmp = x;
} else if (z <= 2.15e+15) {
tmp = y * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * -t tmp = 0 if z <= -2.1e-96: tmp = t_1 elif z <= -2.6e-296: tmp = y * t elif z <= 2.4e-280: tmp = x elif z <= 2.15e+15: tmp = y * t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(-t)) tmp = 0.0 if (z <= -2.1e-96) tmp = t_1; elseif (z <= -2.6e-296) tmp = Float64(y * t); elseif (z <= 2.4e-280) tmp = x; elseif (z <= 2.15e+15) tmp = Float64(y * t); 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.1e-96) tmp = t_1; elseif (z <= -2.6e-296) tmp = y * t; elseif (z <= 2.4e-280) tmp = x; elseif (z <= 2.15e+15) tmp = y * t; 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.1e-96], t$95$1, If[LessEqual[z, -2.6e-296], N[(y * t), $MachinePrecision], If[LessEqual[z, 2.4e-280], x, If[LessEqual[z, 2.15e+15], N[(y * t), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(-t\right)\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{-96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-296}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-280}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+15}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.10000000000000001e-96 or 2.15e15 < z Initial program 99.9%
Taylor expanded in t around inf 61.9%
Taylor expanded in y around 0 48.0%
associate-*r*48.0%
mul-1-neg48.0%
Simplified48.0%
Taylor expanded in x around 0 45.0%
associate-*r*45.0%
mul-1-neg45.0%
Simplified45.0%
if -2.10000000000000001e-96 < z < -2.6000000000000001e-296 or 2.3999999999999998e-280 < z < 2.15e15Initial program 100.0%
Taylor expanded in y around inf 89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in y around inf 85.7%
Taylor expanded in t around inf 45.1%
*-commutative45.1%
Simplified45.1%
if -2.6000000000000001e-296 < z < 2.3999999999999998e-280Initial program 100.0%
Taylor expanded in y around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 88.7%
Final simplification47.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1150000000000.0) (not (<= t 0.00255))) (+ x (* (- y z) t)) (* x (+ (- z y) 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1150000000000.0) || !(t <= 0.00255)) {
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 <= (-1150000000000.0d0)) .or. (.not. (t <= 0.00255d0))) 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 <= -1150000000000.0) || !(t <= 0.00255)) {
tmp = x + ((y - z) * t);
} else {
tmp = x * ((z - y) + 1.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1150000000000.0) or not (t <= 0.00255): 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 <= -1150000000000.0) || !(t <= 0.00255)) 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 <= -1150000000000.0) || ~((t <= 0.00255))) 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, -1150000000000.0], N[Not[LessEqual[t, 0.00255]], $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 -1150000000000 \lor \neg \left(t \leq 0.00255\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.15e12 or 0.0025500000000000002 < t Initial program 100.0%
Taylor expanded in t around inf 91.5%
if -1.15e12 < t < 0.0025500000000000002Initial program 100.0%
Taylor expanded in x around inf 79.6%
mul-1-neg79.6%
unsub-neg79.6%
Simplified79.6%
Final simplification85.7%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.2e+21) (not (<= t 0.00125))) (* y t) (* y (- x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.2e+21) || !(t <= 0.00125)) {
tmp = y * t;
} else {
tmp = y * -x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-1.2d+21)) .or. (.not. (t <= 0.00125d0))) then
tmp = y * t
else
tmp = y * -x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.2e+21) || !(t <= 0.00125)) {
tmp = y * t;
} else {
tmp = y * -x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.2e+21) or not (t <= 0.00125): tmp = y * t else: tmp = y * -x return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.2e+21) || !(t <= 0.00125)) tmp = Float64(y * t); else tmp = Float64(y * Float64(-x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.2e+21) || ~((t <= 0.00125))) tmp = y * t; else tmp = y * -x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.2e+21], N[Not[LessEqual[t, 0.00125]], $MachinePrecision]], N[(y * t), $MachinePrecision], N[(y * (-x)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+21} \lor \neg \left(t \leq 0.00125\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-x\right)\\
\end{array}
\end{array}
if t < -1.2e21 or 0.00125000000000000003 < t Initial program 100.0%
Taylor expanded in y around inf 55.9%
*-commutative55.9%
Simplified55.9%
Taylor expanded in y around inf 57.3%
Taylor expanded in t around inf 47.0%
*-commutative47.0%
Simplified47.0%
if -1.2e21 < t < 0.00125000000000000003Initial program 100.0%
Taylor expanded in x around inf 79.0%
mul-1-neg79.0%
unsub-neg79.0%
Simplified79.0%
Taylor expanded in z around 0 57.8%
Taylor expanded in y around inf 38.4%
associate-*r*38.4%
neg-mul-138.4%
*-commutative38.4%
Simplified38.4%
Final simplification42.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.8e-11) (not (<= y 9e-173))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.8e-11) || !(y <= 9e-173)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-3.8d-11)) .or. (.not. (y <= 9d-173))) then
tmp = y * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.8e-11) || !(y <= 9e-173)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.8e-11) or not (y <= 9e-173): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.8e-11) || !(y <= 9e-173)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.8e-11) || ~((y <= 9e-173))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.8e-11], N[Not[LessEqual[y, 9e-173]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-11} \lor \neg \left(y \leq 9 \cdot 10^{-173}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.7999999999999998e-11 or 9.00000000000000037e-173 < y Initial program 99.9%
Taylor expanded in y around inf 71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in y around inf 71.7%
Taylor expanded in t around inf 39.0%
*-commutative39.0%
Simplified39.0%
if -3.7999999999999998e-11 < y < 9.00000000000000037e-173Initial program 100.0%
Taylor expanded in y around inf 39.1%
*-commutative39.1%
Simplified39.1%
Taylor expanded in y around 0 34.7%
Final simplification37.7%
(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 y around inf 61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in y around 0 14.4%
(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 2024108
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:alt
(+ x (+ (* t (- y z)) (* (- x) (- y z))))
(+ x (* (- y z) (- t x))))