
(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 99.9%
+-commutative99.9%
fma-define100.0%
Simplified100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -6e-11)
t_1
(if (<= z 1.3e-235)
(+ x (* y t))
(if (<= z 3.7e-109)
(- x (* y x))
(if (<= z 6.2e+40) (* t (- y z)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -6e-11) {
tmp = t_1;
} else if (z <= 1.3e-235) {
tmp = x + (y * t);
} else if (z <= 3.7e-109) {
tmp = x - (y * x);
} else if (z <= 6.2e+40) {
tmp = t * (y - z);
} 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 <= (-6d-11)) then
tmp = t_1
else if (z <= 1.3d-235) then
tmp = x + (y * t)
else if (z <= 3.7d-109) then
tmp = x - (y * x)
else if (z <= 6.2d+40) then
tmp = t * (y - z)
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 <= -6e-11) {
tmp = t_1;
} else if (z <= 1.3e-235) {
tmp = x + (y * t);
} else if (z <= 3.7e-109) {
tmp = x - (y * x);
} else if (z <= 6.2e+40) {
tmp = t * (y - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -6e-11: tmp = t_1 elif z <= 1.3e-235: tmp = x + (y * t) elif z <= 3.7e-109: tmp = x - (y * x) elif z <= 6.2e+40: tmp = t * (y - z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -6e-11) tmp = t_1; elseif (z <= 1.3e-235) tmp = Float64(x + Float64(y * t)); elseif (z <= 3.7e-109) tmp = Float64(x - Float64(y * x)); elseif (z <= 6.2e+40) tmp = Float64(t * Float64(y - z)); 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 <= -6e-11) tmp = t_1; elseif (z <= 1.3e-235) tmp = x + (y * t); elseif (z <= 3.7e-109) tmp = x - (y * x); elseif (z <= 6.2e+40) tmp = t * (y - z); 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, -6e-11], t$95$1, If[LessEqual[z, 1.3e-235], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-109], N[(x - N[(y * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+40], N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -6 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{-235}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-109}:\\
\;\;\;\;x - y \cdot x\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+40}:\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6e-11 or 6.1999999999999995e40 < z Initial program 100.0%
Taylor expanded in y around 0 76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
Taylor expanded in z around inf 75.8%
if -6e-11 < z < 1.3e-235Initial program 99.9%
Taylor expanded in t around inf 81.1%
Taylor expanded in y around inf 73.0%
if 1.3e-235 < z < 3.69999999999999981e-109Initial program 100.0%
Taylor expanded in t around 0 78.6%
mul-1-neg78.6%
distribute-rgt-neg-in78.6%
sub-neg78.6%
+-commutative78.6%
distribute-neg-in78.6%
remove-double-neg78.6%
sub-neg78.6%
Simplified78.6%
Taylor expanded in z around 0 78.6%
mul-1-neg78.6%
unsub-neg78.6%
Simplified78.6%
if 3.69999999999999981e-109 < z < 6.1999999999999995e40Initial program 99.9%
Taylor expanded in t around inf 86.1%
Taylor expanded in t around inf 86.1%
associate--l+86.1%
Simplified86.1%
Taylor expanded in x around 0 85.7%
Final simplification76.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))) (t_2 (* (- y z) t)))
(if (<= z -6.5e+27)
t_1
(if (<= z -4.2e-205)
t_2
(if (<= z 3.4e-150) x (if (<= z 1.1e+41) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double t_2 = (y - z) * t;
double tmp;
if (z <= -6.5e+27) {
tmp = t_1;
} else if (z <= -4.2e-205) {
tmp = t_2;
} else if (z <= 3.4e-150) {
tmp = x;
} else if (z <= 1.1e+41) {
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 - z) * t
if (z <= (-6.5d+27)) then
tmp = t_1
else if (z <= (-4.2d-205)) then
tmp = t_2
else if (z <= 3.4d-150) then
tmp = x
else if (z <= 1.1d+41) 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 - z) * t;
double tmp;
if (z <= -6.5e+27) {
tmp = t_1;
} else if (z <= -4.2e-205) {
tmp = t_2;
} else if (z <= 3.4e-150) {
tmp = x;
} else if (z <= 1.1e+41) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) t_2 = (y - z) * t tmp = 0 if z <= -6.5e+27: tmp = t_1 elif z <= -4.2e-205: tmp = t_2 elif z <= 3.4e-150: tmp = x elif z <= 1.1e+41: 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(Float64(y - z) * t) tmp = 0.0 if (z <= -6.5e+27) tmp = t_1; elseif (z <= -4.2e-205) tmp = t_2; elseif (z <= 3.4e-150) tmp = x; elseif (z <= 1.1e+41) 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 - z) * t; tmp = 0.0; if (z <= -6.5e+27) tmp = t_1; elseif (z <= -4.2e-205) tmp = t_2; elseif (z <= 3.4e-150) tmp = x; elseif (z <= 1.1e+41) 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[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -6.5e+27], t$95$1, If[LessEqual[z, -4.2e-205], t$95$2, If[LessEqual[z, 3.4e-150], x, If[LessEqual[z, 1.1e+41], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := \left(y - z\right) \cdot t\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-205}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-150}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+41}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.5000000000000005e27 or 1.09999999999999995e41 < z Initial program 100.0%
Taylor expanded in y around 0 82.3%
mul-1-neg82.3%
unsub-neg82.3%
Simplified82.3%
Taylor expanded in z around inf 82.3%
if -6.5000000000000005e27 < z < -4.19999999999999965e-205 or 3.39999999999999999e-150 < z < 1.09999999999999995e41Initial program 99.9%
Taylor expanded in t around inf 75.2%
Taylor expanded in t around inf 76.1%
associate--l+76.1%
Simplified76.1%
Taylor expanded in x around 0 59.7%
if -4.19999999999999965e-205 < z < 3.39999999999999999e-150Initial program 100.0%
Taylor expanded in t around inf 79.0%
Taylor expanded in x around inf 51.6%
Final simplification67.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- y z))))
(if (<= t -2.1)
t_1
(if (<= t -2.35e-181)
x
(if (<= t 1.32e-245) (* z x) (if (<= t 2.9e-180) (- (* y x)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y - z);
double tmp;
if (t <= -2.1) {
tmp = t_1;
} else if (t <= -2.35e-181) {
tmp = x;
} else if (t <= 1.32e-245) {
tmp = z * x;
} else if (t <= 2.9e-180) {
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 = t * (y - z)
if (t <= (-2.1d0)) then
tmp = t_1
else if (t <= (-2.35d-181)) then
tmp = x
else if (t <= 1.32d-245) then
tmp = z * x
else if (t <= 2.9d-180) 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 = t * (y - z);
double tmp;
if (t <= -2.1) {
tmp = t_1;
} else if (t <= -2.35e-181) {
tmp = x;
} else if (t <= 1.32e-245) {
tmp = z * x;
} else if (t <= 2.9e-180) {
tmp = -(y * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y - z) tmp = 0 if t <= -2.1: tmp = t_1 elif t <= -2.35e-181: tmp = x elif t <= 1.32e-245: tmp = z * x elif t <= 2.9e-180: tmp = -(y * x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y - z)) tmp = 0.0 if (t <= -2.1) tmp = t_1; elseif (t <= -2.35e-181) tmp = x; elseif (t <= 1.32e-245) tmp = Float64(z * x); elseif (t <= 2.9e-180) tmp = Float64(-Float64(y * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y - z); tmp = 0.0; if (t <= -2.1) tmp = t_1; elseif (t <= -2.35e-181) tmp = x; elseif (t <= 1.32e-245) tmp = z * x; elseif (t <= 2.9e-180) tmp = -(y * x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1], t$95$1, If[LessEqual[t, -2.35e-181], x, If[LessEqual[t, 1.32e-245], N[(z * x), $MachinePrecision], If[LessEqual[t, 2.9e-180], (-N[(y * x), $MachinePrecision]), t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(y - z\right)\\
\mathbf{if}\;t \leq -2.1:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.35 \cdot 10^{-181}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{-245}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-180}:\\
\;\;\;\;-y \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.10000000000000009 or 2.8999999999999998e-180 < t Initial program 99.9%
Taylor expanded in t around inf 81.3%
Taylor expanded in t around inf 81.9%
associate--l+81.9%
Simplified81.9%
Taylor expanded in x around 0 71.3%
if -2.10000000000000009 < t < -2.3499999999999999e-181Initial program 100.0%
Taylor expanded in t around inf 61.1%
Taylor expanded in x around inf 42.5%
if -2.3499999999999999e-181 < t < 1.32e-245Initial program 100.0%
Taylor expanded in y around 0 76.0%
mul-1-neg76.0%
unsub-neg76.0%
Simplified76.0%
Taylor expanded in z around inf 60.4%
Taylor expanded in x around inf 60.2%
*-commutative60.2%
Simplified60.2%
if 1.32e-245 < t < 2.8999999999999998e-180Initial program 99.9%
Taylor expanded in t around 0 89.0%
mul-1-neg89.0%
distribute-rgt-neg-in89.0%
sub-neg89.0%
+-commutative89.0%
distribute-neg-in89.0%
remove-double-neg89.0%
sub-neg89.0%
Simplified89.0%
Taylor expanded in z around 0 72.9%
mul-1-neg72.9%
unsub-neg72.9%
Simplified72.9%
Taylor expanded in y around inf 42.3%
associate-*r*42.3%
neg-mul-142.3%
*-commutative42.3%
Simplified42.3%
Final simplification63.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -4.7e+29)
t_1
(if (<= z 6.6e-109)
(+ x (* y (- t x)))
(if (<= z 9.5e+40) (* t (- y z)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -4.7e+29) {
tmp = t_1;
} else if (z <= 6.6e-109) {
tmp = x + (y * (t - x));
} else if (z <= 9.5e+40) {
tmp = t * (y - z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z * (x - t)
if (z <= (-4.7d+29)) then
tmp = t_1
else if (z <= 6.6d-109) then
tmp = x + (y * (t - x))
else if (z <= 9.5d+40) then
tmp = t * (y - z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -4.7e+29) {
tmp = t_1;
} else if (z <= 6.6e-109) {
tmp = x + (y * (t - x));
} else if (z <= 9.5e+40) {
tmp = t * (y - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -4.7e+29: tmp = t_1 elif z <= 6.6e-109: tmp = x + (y * (t - x)) elif z <= 9.5e+40: tmp = t * (y - z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x - t)) tmp = 0.0 if (z <= -4.7e+29) tmp = t_1; elseif (z <= 6.6e-109) tmp = Float64(x + Float64(y * Float64(t - x))); elseif (z <= 9.5e+40) tmp = Float64(t * Float64(y - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x - t); tmp = 0.0; if (z <= -4.7e+29) tmp = t_1; elseif (z <= 6.6e-109) tmp = x + (y * (t - x)); elseif (z <= 9.5e+40) tmp = t * (y - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.7e+29], t$95$1, If[LessEqual[z, 6.6e-109], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+40], N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -4.7 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-109}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+40}:\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.7000000000000002e29 or 9.5000000000000003e40 < z Initial program 100.0%
Taylor expanded in y around 0 82.3%
mul-1-neg82.3%
unsub-neg82.3%
Simplified82.3%
Taylor expanded in z around inf 82.3%
if -4.7000000000000002e29 < z < 6.59999999999999981e-109Initial program 100.0%
Taylor expanded in y around inf 88.2%
*-commutative88.2%
Simplified88.2%
if 6.59999999999999981e-109 < z < 9.5000000000000003e40Initial program 99.9%
Taylor expanded in t around inf 86.1%
Taylor expanded in t around inf 86.1%
associate--l+86.1%
Simplified86.1%
Taylor expanded in x around 0 85.7%
Final simplification85.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (- x t))))
(if (<= z -7.5e-11)
t_1
(if (<= z 6.6e-109)
(+ x (* y t))
(if (<= z 6.4e+40) (* (- y z) t) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x - t);
double tmp;
if (z <= -7.5e-11) {
tmp = t_1;
} else if (z <= 6.6e-109) {
tmp = x + (y * t);
} else if (z <= 6.4e+40) {
tmp = (y - z) * 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 <= (-7.5d-11)) then
tmp = t_1
else if (z <= 6.6d-109) then
tmp = x + (y * t)
else if (z <= 6.4d+40) then
tmp = (y - z) * 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 <= -7.5e-11) {
tmp = t_1;
} else if (z <= 6.6e-109) {
tmp = x + (y * t);
} else if (z <= 6.4e+40) {
tmp = (y - z) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x - t) tmp = 0 if z <= -7.5e-11: tmp = t_1 elif z <= 6.6e-109: tmp = x + (y * t) elif z <= 6.4e+40: tmp = (y - z) * 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 <= -7.5e-11) tmp = t_1; elseif (z <= 6.6e-109) tmp = Float64(x + Float64(y * t)); elseif (z <= 6.4e+40) tmp = Float64(Float64(y - z) * 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 <= -7.5e-11) tmp = t_1; elseif (z <= 6.6e-109) tmp = x + (y * t); elseif (z <= 6.4e+40) tmp = (y - z) * 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, -7.5e-11], t$95$1, If[LessEqual[z, 6.6e-109], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e+40], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-109}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+40}:\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.5e-11 or 6.39999999999999961e40 < z Initial program 100.0%
Taylor expanded in y around 0 76.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
Taylor expanded in z around inf 75.8%
if -7.5e-11 < z < 6.59999999999999981e-109Initial program 100.0%
Taylor expanded in t around inf 77.7%
Taylor expanded in y around inf 70.6%
if 6.59999999999999981e-109 < z < 6.39999999999999961e40Initial program 99.9%
Taylor expanded in t around inf 86.1%
Taylor expanded in t around inf 86.1%
associate--l+86.1%
Simplified86.1%
Taylor expanded in x around 0 85.7%
Final simplification75.1%
(FPCore (x y z t) :precision binary64 (if (<= y -4.5e-7) (* y t) (if (<= y -2.1e-212) (* z x) (if (<= y 6.2e+61) (* t (- z)) (- (* y x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.5e-7) {
tmp = y * t;
} else if (y <= -2.1e-212) {
tmp = z * x;
} else if (y <= 6.2e+61) {
tmp = t * -z;
} 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 (y <= (-4.5d-7)) then
tmp = y * t
else if (y <= (-2.1d-212)) then
tmp = z * x
else if (y <= 6.2d+61) then
tmp = t * -z
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 (y <= -4.5e-7) {
tmp = y * t;
} else if (y <= -2.1e-212) {
tmp = z * x;
} else if (y <= 6.2e+61) {
tmp = t * -z;
} else {
tmp = -(y * x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.5e-7: tmp = y * t elif y <= -2.1e-212: tmp = z * x elif y <= 6.2e+61: tmp = t * -z else: tmp = -(y * x) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.5e-7) tmp = Float64(y * t); elseif (y <= -2.1e-212) tmp = Float64(z * x); elseif (y <= 6.2e+61) tmp = Float64(t * Float64(-z)); else tmp = Float64(-Float64(y * x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.5e-7) tmp = y * t; elseif (y <= -2.1e-212) tmp = z * x; elseif (y <= 6.2e+61) tmp = t * -z; else tmp = -(y * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.5e-7], N[(y * t), $MachinePrecision], If[LessEqual[y, -2.1e-212], N[(z * x), $MachinePrecision], If[LessEqual[y, 6.2e+61], N[(t * (-z)), $MachinePrecision], (-N[(y * x), $MachinePrecision])]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-7}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-212}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+61}:\\
\;\;\;\;t \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;-y \cdot x\\
\end{array}
\end{array}
if y < -4.4999999999999998e-7Initial program 100.0%
Taylor expanded in t around inf 58.9%
Taylor expanded in t around inf 65.8%
associate--l+65.8%
Simplified65.8%
Taylor expanded in y around inf 50.4%
if -4.4999999999999998e-7 < y < -2.1e-212Initial program 100.0%
Taylor expanded in y around 0 91.8%
mul-1-neg91.8%
unsub-neg91.8%
Simplified91.8%
Taylor expanded in z around inf 70.2%
Taylor expanded in x around inf 42.1%
*-commutative42.1%
Simplified42.1%
if -2.1e-212 < y < 6.1999999999999998e61Initial program 99.9%
Taylor expanded in t around inf 82.1%
Taylor expanded in t around inf 77.4%
associate--l+77.4%
Simplified77.4%
Taylor expanded in z around inf 43.1%
neg-mul-143.1%
Simplified43.1%
if 6.1999999999999998e61 < y Initial program 99.9%
Taylor expanded in t around 0 62.2%
mul-1-neg62.2%
distribute-rgt-neg-in62.2%
sub-neg62.2%
+-commutative62.2%
distribute-neg-in62.2%
remove-double-neg62.2%
sub-neg62.2%
Simplified62.2%
Taylor expanded in z around 0 60.0%
mul-1-neg60.0%
unsub-neg60.0%
Simplified60.0%
Taylor expanded in y around inf 60.0%
associate-*r*60.0%
neg-mul-160.0%
*-commutative60.0%
Simplified60.0%
Final simplification47.3%
(FPCore (x y z t) :precision binary64 (if (<= y -3.8e-12) (* y t) (if (<= y -3.5e-211) (* z x) (if (<= y 0.0042) (* t (- z)) (* y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.8e-12) {
tmp = y * t;
} else if (y <= -3.5e-211) {
tmp = z * x;
} else if (y <= 0.0042) {
tmp = t * -z;
} else {
tmp = y * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3.8d-12)) then
tmp = y * t
else if (y <= (-3.5d-211)) then
tmp = z * x
else if (y <= 0.0042d0) then
tmp = t * -z
else
tmp = y * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.8e-12) {
tmp = y * t;
} else if (y <= -3.5e-211) {
tmp = z * x;
} else if (y <= 0.0042) {
tmp = t * -z;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.8e-12: tmp = y * t elif y <= -3.5e-211: tmp = z * x elif y <= 0.0042: tmp = t * -z else: tmp = y * t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.8e-12) tmp = Float64(y * t); elseif (y <= -3.5e-211) tmp = Float64(z * x); elseif (y <= 0.0042) tmp = Float64(t * Float64(-z)); else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.8e-12) tmp = y * t; elseif (y <= -3.5e-211) tmp = z * x; elseif (y <= 0.0042) tmp = t * -z; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.8e-12], N[(y * t), $MachinePrecision], If[LessEqual[y, -3.5e-211], N[(z * x), $MachinePrecision], If[LessEqual[y, 0.0042], N[(t * (-z)), $MachinePrecision], N[(y * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-12}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-211}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 0.0042:\\
\;\;\;\;t \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -3.79999999999999996e-12 or 0.00419999999999999974 < y Initial program 99.9%
Taylor expanded in t around inf 55.2%
Taylor expanded in t around inf 58.4%
associate--l+58.4%
Simplified58.4%
Taylor expanded in y around inf 47.0%
if -3.79999999999999996e-12 < y < -3.5e-211Initial program 100.0%
Taylor expanded in y around 0 91.8%
mul-1-neg91.8%
unsub-neg91.8%
Simplified91.8%
Taylor expanded in z around inf 70.2%
Taylor expanded in x around inf 42.1%
*-commutative42.1%
Simplified42.1%
if -3.5e-211 < y < 0.00419999999999999974Initial program 99.9%
Taylor expanded in t around inf 85.4%
Taylor expanded in t around inf 79.7%
associate--l+79.8%
Simplified79.8%
Taylor expanded in z around inf 46.6%
neg-mul-146.6%
Simplified46.6%
Final simplification45.8%
(FPCore (x y z t) :precision binary64 (if (<= y -1.15e-12) (* y t) (if (<= y -6.5e-228) (* z x) (if (<= y 5.2e-12) x (* y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e-12) {
tmp = y * t;
} else if (y <= -6.5e-228) {
tmp = z * x;
} else if (y <= 5.2e-12) {
tmp = x;
} else {
tmp = y * t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.15d-12)) then
tmp = y * t
else if (y <= (-6.5d-228)) then
tmp = z * x
else if (y <= 5.2d-12) then
tmp = x
else
tmp = y * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.15e-12) {
tmp = y * t;
} else if (y <= -6.5e-228) {
tmp = z * x;
} else if (y <= 5.2e-12) {
tmp = x;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.15e-12: tmp = y * t elif y <= -6.5e-228: tmp = z * x elif y <= 5.2e-12: tmp = x else: tmp = y * t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.15e-12) tmp = Float64(y * t); elseif (y <= -6.5e-228) tmp = Float64(z * x); elseif (y <= 5.2e-12) tmp = x; else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.15e-12) tmp = y * t; elseif (y <= -6.5e-228) tmp = z * x; elseif (y <= 5.2e-12) tmp = x; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.15e-12], N[(y * t), $MachinePrecision], If[LessEqual[y, -6.5e-228], N[(z * x), $MachinePrecision], If[LessEqual[y, 5.2e-12], x, N[(y * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-12}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-228}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-12}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -1.14999999999999995e-12 or 5.19999999999999965e-12 < y Initial program 99.9%
Taylor expanded in t around inf 55.2%
Taylor expanded in t around inf 58.4%
associate--l+58.4%
Simplified58.4%
Taylor expanded in y around inf 47.0%
if -1.14999999999999995e-12 < y < -6.50000000000000029e-228Initial program 100.0%
Taylor expanded in y around 0 92.4%
mul-1-neg92.4%
unsub-neg92.4%
Simplified92.4%
Taylor expanded in z around inf 72.2%
Taylor expanded in x around inf 41.1%
*-commutative41.1%
Simplified41.1%
if -6.50000000000000029e-228 < y < 5.19999999999999965e-12Initial program 99.9%
Taylor expanded in t around inf 85.9%
Taylor expanded in x around inf 36.7%
Final simplification42.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.45e-32) (not (<= y 220000000000.0))) (+ x (* y (- t x))) (+ x (* z (- x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.45e-32) || !(y <= 220000000000.0)) {
tmp = x + (y * (t - x));
} else {
tmp = x + (z * (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 ((y <= (-2.45d-32)) .or. (.not. (y <= 220000000000.0d0))) then
tmp = x + (y * (t - x))
else
tmp = x + (z * (x - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.45e-32) || !(y <= 220000000000.0)) {
tmp = x + (y * (t - x));
} else {
tmp = x + (z * (x - t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.45e-32) or not (y <= 220000000000.0): tmp = x + (y * (t - x)) else: tmp = x + (z * (x - t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.45e-32) || !(y <= 220000000000.0)) tmp = Float64(x + Float64(y * Float64(t - x))); else tmp = Float64(x + Float64(z * Float64(x - t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.45e-32) || ~((y <= 220000000000.0))) tmp = x + (y * (t - x)); else tmp = x + (z * (x - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.45e-32], N[Not[LessEqual[y, 220000000000.0]], $MachinePrecision]], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.45 \cdot 10^{-32} \lor \neg \left(y \leq 220000000000\right):\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\end{array}
\end{array}
if y < -2.4499999999999999e-32 or 2.2e11 < y Initial program 99.9%
Taylor expanded in y around inf 82.9%
*-commutative82.9%
Simplified82.9%
if -2.4499999999999999e-32 < y < 2.2e11Initial program 100.0%
Taylor expanded in y around 0 92.8%
mul-1-neg92.8%
unsub-neg92.8%
Simplified92.8%
Final simplification88.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -20.5) (not (<= t 4.5e-116))) (- x (* t (- z y))) (+ x (* x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -20.5) || !(t <= 4.5e-116)) {
tmp = x - (t * (z - y));
} else {
tmp = x + (x * (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-20.5d0)) .or. (.not. (t <= 4.5d-116))) then
tmp = x - (t * (z - y))
else
tmp = x + (x * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -20.5) || !(t <= 4.5e-116)) {
tmp = x - (t * (z - y));
} else {
tmp = x + (x * (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -20.5) or not (t <= 4.5e-116): tmp = x - (t * (z - y)) else: tmp = x + (x * (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -20.5) || !(t <= 4.5e-116)) tmp = Float64(x - Float64(t * Float64(z - y))); else tmp = Float64(x + Float64(x * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -20.5) || ~((t <= 4.5e-116))) tmp = x - (t * (z - y)); else tmp = x + (x * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -20.5], N[Not[LessEqual[t, 4.5e-116]], $MachinePrecision]], N[(x - N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -20.5 \lor \neg \left(t \leq 4.5 \cdot 10^{-116}\right):\\
\;\;\;\;x - t \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(z - y\right)\\
\end{array}
\end{array}
if t < -20.5 or 4.50000000000000012e-116 < t Initial program 99.9%
Taylor expanded in t around inf 83.5%
if -20.5 < t < 4.50000000000000012e-116Initial program 100.0%
Taylor expanded in t around 0 87.3%
mul-1-neg87.3%
distribute-rgt-neg-in87.3%
sub-neg87.3%
+-commutative87.3%
distribute-neg-in87.3%
remove-double-neg87.3%
sub-neg87.3%
Simplified87.3%
Final simplification85.0%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2400.0) (not (<= t 1.8e+26))) (* t (- y z)) (+ x (* x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2400.0) || !(t <= 1.8e+26)) {
tmp = t * (y - z);
} else {
tmp = x + (x * (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-2400.0d0)) .or. (.not. (t <= 1.8d+26))) then
tmp = t * (y - z)
else
tmp = x + (x * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2400.0) || !(t <= 1.8e+26)) {
tmp = t * (y - z);
} else {
tmp = x + (x * (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2400.0) or not (t <= 1.8e+26): tmp = t * (y - z) else: tmp = x + (x * (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2400.0) || !(t <= 1.8e+26)) tmp = Float64(t * Float64(y - z)); else tmp = Float64(x + Float64(x * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2400.0) || ~((t <= 1.8e+26))) tmp = t * (y - z); else tmp = x + (x * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2400.0], N[Not[LessEqual[t, 1.8e+26]], $MachinePrecision]], N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2400 \lor \neg \left(t \leq 1.8 \cdot 10^{+26}\right):\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(z - y\right)\\
\end{array}
\end{array}
if t < -2400 or 1.80000000000000012e26 < t Initial program 99.9%
Taylor expanded in t around inf 86.0%
Taylor expanded in t around inf 86.0%
associate--l+86.0%
Simplified86.0%
Taylor expanded in x around 0 79.5%
if -2400 < t < 1.80000000000000012e26Initial program 100.0%
Taylor expanded in t around 0 82.6%
mul-1-neg82.6%
distribute-rgt-neg-in82.6%
sub-neg82.6%
+-commutative82.6%
distribute-neg-in82.6%
remove-double-neg82.6%
sub-neg82.6%
Simplified82.6%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.8e-35) (not (<= y 4.6e-11))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.8e-35) || !(y <= 4.6e-11)) {
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 <= (-4.8d-35)) .or. (.not. (y <= 4.6d-11))) 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 <= -4.8e-35) || !(y <= 4.6e-11)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.8e-35) or not (y <= 4.6e-11): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.8e-35) || !(y <= 4.6e-11)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.8e-35) || ~((y <= 4.6e-11))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.8e-35], N[Not[LessEqual[y, 4.6e-11]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-35} \lor \neg \left(y \leq 4.6 \cdot 10^{-11}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.8000000000000003e-35 or 4.60000000000000027e-11 < y Initial program 99.9%
Taylor expanded in t around inf 55.5%
Taylor expanded in t around inf 59.4%
associate--l+59.4%
Simplified59.4%
Taylor expanded in y around inf 46.1%
if -4.8000000000000003e-35 < y < 4.60000000000000027e-11Initial program 100.0%
Taylor expanded in t around inf 76.1%
Taylor expanded in x around inf 31.3%
Final simplification38.2%
(FPCore (x y z t) :precision binary64 (+ x (* (- t x) (- y z))))
double code(double x, double y, double z, double t) {
return x + ((t - x) * (y - z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((t - x) * (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t - x) * (y - z));
}
def code(x, y, z, t): return x + ((t - x) * (y - z))
function code(x, y, z, t) return Float64(x + Float64(Float64(t - x) * Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x + ((t - x) * (y - z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t - x), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t - x\right) \cdot \left(y - z\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(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 99.9%
Taylor expanded in t around inf 66.5%
Taylor expanded in x around inf 18.3%
(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 2024186
(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))))