
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
(FPCore (x y z t) :precision binary64 (fma (- y z) (- t x) x))
double code(double x, double y, double z, double t) {
return fma((y - z), (t - x), x);
}
function code(x, y, z, t) return fma(Float64(y - z), Float64(t - x), x) end
code[x_, y_, z_, t_] := N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - z, t - x, x\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- x))))
(if (<= z -1.5e+14)
(* z x)
(if (<= z -2.2e-59)
t_1
(if (<= z -5.4e-104)
x
(if (<= z 5.2e-253)
(* y t)
(if (<= z 4e-127) x (if (<= z 3.25e+114) t_1 (* z (- t))))))))))
double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double tmp;
if (z <= -1.5e+14) {
tmp = z * x;
} else if (z <= -2.2e-59) {
tmp = t_1;
} else if (z <= -5.4e-104) {
tmp = x;
} else if (z <= 5.2e-253) {
tmp = y * t;
} else if (z <= 4e-127) {
tmp = x;
} else if (z <= 3.25e+114) {
tmp = t_1;
} else {
tmp = z * -t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * -x
if (z <= (-1.5d+14)) then
tmp = z * x
else if (z <= (-2.2d-59)) then
tmp = t_1
else if (z <= (-5.4d-104)) then
tmp = x
else if (z <= 5.2d-253) then
tmp = y * t
else if (z <= 4d-127) then
tmp = x
else if (z <= 3.25d+114) then
tmp = t_1
else
tmp = z * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * -x;
double tmp;
if (z <= -1.5e+14) {
tmp = z * x;
} else if (z <= -2.2e-59) {
tmp = t_1;
} else if (z <= -5.4e-104) {
tmp = x;
} else if (z <= 5.2e-253) {
tmp = y * t;
} else if (z <= 4e-127) {
tmp = x;
} else if (z <= 3.25e+114) {
tmp = t_1;
} else {
tmp = z * -t;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * -x tmp = 0 if z <= -1.5e+14: tmp = z * x elif z <= -2.2e-59: tmp = t_1 elif z <= -5.4e-104: tmp = x elif z <= 5.2e-253: tmp = y * t elif z <= 4e-127: tmp = x elif z <= 3.25e+114: tmp = t_1 else: tmp = z * -t return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-x)) tmp = 0.0 if (z <= -1.5e+14) tmp = Float64(z * x); elseif (z <= -2.2e-59) tmp = t_1; elseif (z <= -5.4e-104) tmp = x; elseif (z <= 5.2e-253) tmp = Float64(y * t); elseif (z <= 4e-127) tmp = x; elseif (z <= 3.25e+114) tmp = t_1; else tmp = Float64(z * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * -x; tmp = 0.0; if (z <= -1.5e+14) tmp = z * x; elseif (z <= -2.2e-59) tmp = t_1; elseif (z <= -5.4e-104) tmp = x; elseif (z <= 5.2e-253) tmp = y * t; elseif (z <= 4e-127) tmp = x; elseif (z <= 3.25e+114) tmp = t_1; else tmp = z * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * (-x)), $MachinePrecision]}, If[LessEqual[z, -1.5e+14], N[(z * x), $MachinePrecision], If[LessEqual[z, -2.2e-59], t$95$1, If[LessEqual[z, -5.4e-104], x, If[LessEqual[z, 5.2e-253], N[(y * t), $MachinePrecision], If[LessEqual[z, 4e-127], x, If[LessEqual[z, 3.25e+114], t$95$1, N[(z * (-t)), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-x\right)\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+14}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{-104}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-253}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-127}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.25 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -1.5e14Initial program 100.0%
Taylor expanded in t around 0 56.8%
mul-1-neg56.8%
distribute-lft-neg-out56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in x around 0 56.8%
mul-1-neg56.8%
unsub-neg56.8%
Simplified56.8%
Taylor expanded in z around inf 48.9%
if -1.5e14 < z < -2.1999999999999999e-59 or 4.0000000000000001e-127 < z < 3.2500000000000001e114Initial program 100.0%
Taylor expanded in t around 0 63.8%
mul-1-neg63.8%
distribute-lft-neg-out63.8%
*-commutative63.8%
Simplified63.8%
Taylor expanded in x around 0 63.8%
mul-1-neg63.8%
unsub-neg63.8%
Simplified63.8%
Taylor expanded in y around inf 43.7%
mul-1-neg43.7%
distribute-rgt-neg-out43.7%
Simplified43.7%
if -2.1999999999999999e-59 < z < -5.3999999999999997e-104 or 5.2e-253 < z < 4.0000000000000001e-127Initial program 100.0%
Taylor expanded in t around inf 83.8%
Taylor expanded in x around inf 51.3%
if -5.3999999999999997e-104 < z < 5.2e-253Initial program 100.0%
Taylor expanded in t around inf 76.3%
Taylor expanded in z around 0 74.1%
+-commutative74.1%
Simplified74.1%
Taylor expanded in t around inf 47.7%
*-commutative47.7%
Simplified47.7%
if 3.2500000000000001e114 < z Initial program 100.0%
Taylor expanded in t around inf 64.3%
Taylor expanded in y around 0 60.9%
+-commutative60.9%
mul-1-neg60.9%
Simplified60.9%
Taylor expanded in t around inf 59.9%
associate-*r*59.9%
neg-mul-159.9%
Simplified59.9%
Final simplification49.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* z t))))
(if (<= z -2.5e+142)
(* z x)
(if (<= z -1.7e+80)
t_1
(if (<= z -1.22e+23)
(* z x)
(if (<= z 2.8e-159)
(+ x (* y t))
(if (<= z 3.6e+114) (* x (- 1.0 y)) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (z * t);
double tmp;
if (z <= -2.5e+142) {
tmp = z * x;
} else if (z <= -1.7e+80) {
tmp = t_1;
} else if (z <= -1.22e+23) {
tmp = z * x;
} else if (z <= 2.8e-159) {
tmp = x + (y * t);
} else if (z <= 3.6e+114) {
tmp = x * (1.0 - y);
} 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 = x - (z * t)
if (z <= (-2.5d+142)) then
tmp = z * x
else if (z <= (-1.7d+80)) then
tmp = t_1
else if (z <= (-1.22d+23)) then
tmp = z * x
else if (z <= 2.8d-159) then
tmp = x + (y * t)
else if (z <= 3.6d+114) then
tmp = x * (1.0d0 - y)
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 = x - (z * t);
double tmp;
if (z <= -2.5e+142) {
tmp = z * x;
} else if (z <= -1.7e+80) {
tmp = t_1;
} else if (z <= -1.22e+23) {
tmp = z * x;
} else if (z <= 2.8e-159) {
tmp = x + (y * t);
} else if (z <= 3.6e+114) {
tmp = x * (1.0 - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (z * t) tmp = 0 if z <= -2.5e+142: tmp = z * x elif z <= -1.7e+80: tmp = t_1 elif z <= -1.22e+23: tmp = z * x elif z <= 2.8e-159: tmp = x + (y * t) elif z <= 3.6e+114: tmp = x * (1.0 - y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(z * t)) tmp = 0.0 if (z <= -2.5e+142) tmp = Float64(z * x); elseif (z <= -1.7e+80) tmp = t_1; elseif (z <= -1.22e+23) tmp = Float64(z * x); elseif (z <= 2.8e-159) tmp = Float64(x + Float64(y * t)); elseif (z <= 3.6e+114) tmp = Float64(x * Float64(1.0 - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (z * t); tmp = 0.0; if (z <= -2.5e+142) tmp = z * x; elseif (z <= -1.7e+80) tmp = t_1; elseif (z <= -1.22e+23) tmp = z * x; elseif (z <= 2.8e-159) tmp = x + (y * t); elseif (z <= 3.6e+114) tmp = x * (1.0 - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+142], N[(z * x), $MachinePrecision], If[LessEqual[z, -1.7e+80], t$95$1, If[LessEqual[z, -1.22e+23], N[(z * x), $MachinePrecision], If[LessEqual[z, 2.8e-159], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e+114], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - z \cdot t\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+142}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.22 \cdot 10^{+23}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-159}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+114}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.5000000000000001e142 or -1.69999999999999996e80 < z < -1.22e23Initial program 100.0%
Taylor expanded in t around 0 61.7%
mul-1-neg61.7%
distribute-lft-neg-out61.7%
*-commutative61.7%
Simplified61.7%
Taylor expanded in x around 0 61.7%
mul-1-neg61.7%
unsub-neg61.7%
Simplified61.7%
Taylor expanded in z around inf 57.6%
if -2.5000000000000001e142 < z < -1.69999999999999996e80 or 3.6000000000000001e114 < z Initial program 100.0%
Taylor expanded in t around inf 64.0%
Taylor expanded in y around 0 59.5%
+-commutative59.5%
mul-1-neg59.5%
Simplified59.5%
Taylor expanded in t around 0 59.5%
mul-1-neg59.5%
sub-neg59.5%
Simplified59.5%
if -1.22e23 < z < 2.8000000000000002e-159Initial program 100.0%
Taylor expanded in t around inf 77.8%
Taylor expanded in z around 0 72.7%
+-commutative72.7%
Simplified72.7%
if 2.8000000000000002e-159 < z < 3.6000000000000001e114Initial program 100.0%
Taylor expanded in y around inf 76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in x around inf 55.4%
mul-1-neg55.4%
unsub-neg55.4%
Simplified55.4%
Final simplification63.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* z t))))
(if (<= z -2.6e+140)
(* z x)
(if (<= z -5.4e+76)
t_1
(if (<= z -9.2e+20)
(* z x)
(if (<= z 8e-160)
(+ x (* y t))
(if (<= z 2.35e+116) (- x (* y x)) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (z * t);
double tmp;
if (z <= -2.6e+140) {
tmp = z * x;
} else if (z <= -5.4e+76) {
tmp = t_1;
} else if (z <= -9.2e+20) {
tmp = z * x;
} else if (z <= 8e-160) {
tmp = x + (y * t);
} else if (z <= 2.35e+116) {
tmp = x - (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 = x - (z * t)
if (z <= (-2.6d+140)) then
tmp = z * x
else if (z <= (-5.4d+76)) then
tmp = t_1
else if (z <= (-9.2d+20)) then
tmp = z * x
else if (z <= 8d-160) then
tmp = x + (y * t)
else if (z <= 2.35d+116) then
tmp = x - (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 = x - (z * t);
double tmp;
if (z <= -2.6e+140) {
tmp = z * x;
} else if (z <= -5.4e+76) {
tmp = t_1;
} else if (z <= -9.2e+20) {
tmp = z * x;
} else if (z <= 8e-160) {
tmp = x + (y * t);
} else if (z <= 2.35e+116) {
tmp = x - (y * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (z * t) tmp = 0 if z <= -2.6e+140: tmp = z * x elif z <= -5.4e+76: tmp = t_1 elif z <= -9.2e+20: tmp = z * x elif z <= 8e-160: tmp = x + (y * t) elif z <= 2.35e+116: tmp = x - (y * x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(z * t)) tmp = 0.0 if (z <= -2.6e+140) tmp = Float64(z * x); elseif (z <= -5.4e+76) tmp = t_1; elseif (z <= -9.2e+20) tmp = Float64(z * x); elseif (z <= 8e-160) tmp = Float64(x + Float64(y * t)); elseif (z <= 2.35e+116) tmp = Float64(x - Float64(y * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (z * t); tmp = 0.0; if (z <= -2.6e+140) tmp = z * x; elseif (z <= -5.4e+76) tmp = t_1; elseif (z <= -9.2e+20) tmp = z * x; elseif (z <= 8e-160) tmp = x + (y * t); elseif (z <= 2.35e+116) tmp = x - (y * x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+140], N[(z * x), $MachinePrecision], If[LessEqual[z, -5.4e+76], t$95$1, If[LessEqual[z, -9.2e+20], N[(z * x), $MachinePrecision], If[LessEqual[z, 8e-160], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.35e+116], N[(x - N[(y * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - z \cdot t\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+140}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{+20}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-160}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{+116}:\\
\;\;\;\;x - y \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.6000000000000001e140 or -5.3999999999999998e76 < z < -9.2e20Initial program 100.0%
Taylor expanded in t around 0 61.7%
mul-1-neg61.7%
distribute-lft-neg-out61.7%
*-commutative61.7%
Simplified61.7%
Taylor expanded in x around 0 61.7%
mul-1-neg61.7%
unsub-neg61.7%
Simplified61.7%
Taylor expanded in z around inf 57.6%
if -2.6000000000000001e140 < z < -5.3999999999999998e76 or 2.3500000000000002e116 < z Initial program 100.0%
Taylor expanded in t around inf 64.0%
Taylor expanded in y around 0 59.5%
+-commutative59.5%
mul-1-neg59.5%
Simplified59.5%
Taylor expanded in t around 0 59.5%
mul-1-neg59.5%
sub-neg59.5%
Simplified59.5%
if -9.2e20 < z < 7.9999999999999999e-160Initial program 100.0%
Taylor expanded in t around inf 77.8%
Taylor expanded in z around 0 72.7%
+-commutative72.7%
Simplified72.7%
if 7.9999999999999999e-160 < z < 2.3500000000000002e116Initial program 100.0%
Taylor expanded in y around inf 76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in x around inf 55.4%
mul-1-neg55.4%
unsub-neg55.4%
Simplified55.4%
sub-neg55.4%
distribute-rgt-in55.4%
*-un-lft-identity55.4%
Applied egg-rr55.4%
distribute-lft-neg-out55.4%
unsub-neg55.4%
*-commutative55.4%
Applied egg-rr55.4%
Final simplification63.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 y))))
(if (<= z -76000000.0)
(* z x)
(if (<= z -1.55e-112)
t_1
(if (<= z -7.4e-157) (* y t) (if (<= z 2.9e+114) t_1 (* z (- t))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - y);
double tmp;
if (z <= -76000000.0) {
tmp = z * x;
} else if (z <= -1.55e-112) {
tmp = t_1;
} else if (z <= -7.4e-157) {
tmp = y * t;
} else if (z <= 2.9e+114) {
tmp = t_1;
} else {
tmp = z * -t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - y)
if (z <= (-76000000.0d0)) then
tmp = z * x
else if (z <= (-1.55d-112)) then
tmp = t_1
else if (z <= (-7.4d-157)) then
tmp = y * t
else if (z <= 2.9d+114) then
tmp = t_1
else
tmp = z * -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 tmp;
if (z <= -76000000.0) {
tmp = z * x;
} else if (z <= -1.55e-112) {
tmp = t_1;
} else if (z <= -7.4e-157) {
tmp = y * t;
} else if (z <= 2.9e+114) {
tmp = t_1;
} else {
tmp = z * -t;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - y) tmp = 0 if z <= -76000000.0: tmp = z * x elif z <= -1.55e-112: tmp = t_1 elif z <= -7.4e-157: tmp = y * t elif z <= 2.9e+114: tmp = t_1 else: tmp = z * -t return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - y)) tmp = 0.0 if (z <= -76000000.0) tmp = Float64(z * x); elseif (z <= -1.55e-112) tmp = t_1; elseif (z <= -7.4e-157) tmp = Float64(y * t); elseif (z <= 2.9e+114) tmp = t_1; else tmp = Float64(z * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - y); tmp = 0.0; if (z <= -76000000.0) tmp = z * x; elseif (z <= -1.55e-112) tmp = t_1; elseif (z <= -7.4e-157) tmp = y * t; elseif (z <= 2.9e+114) tmp = t_1; else tmp = z * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -76000000.0], N[(z * x), $MachinePrecision], If[LessEqual[z, -1.55e-112], t$95$1, If[LessEqual[z, -7.4e-157], N[(y * t), $MachinePrecision], If[LessEqual[z, 2.9e+114], t$95$1, N[(z * (-t)), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - y\right)\\
\mathbf{if}\;z \leq -76000000:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.4 \cdot 10^{-157}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -7.6e7Initial program 100.0%
Taylor expanded in t around 0 56.8%
mul-1-neg56.8%
distribute-lft-neg-out56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in x around 0 56.8%
mul-1-neg56.8%
unsub-neg56.8%
Simplified56.8%
Taylor expanded in z around inf 48.9%
if -7.6e7 < z < -1.5499999999999999e-112 or -7.3999999999999995e-157 < z < 2.9e114Initial program 100.0%
Taylor expanded in y around inf 87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in x around inf 61.3%
mul-1-neg61.3%
unsub-neg61.3%
Simplified61.3%
if -1.5499999999999999e-112 < z < -7.3999999999999995e-157Initial program 100.0%
Taylor expanded in t around inf 92.6%
Taylor expanded in z around 0 84.7%
+-commutative84.7%
Simplified84.7%
Taylor expanded in t around inf 68.8%
*-commutative68.8%
Simplified68.8%
if 2.9e114 < z Initial program 100.0%
Taylor expanded in t around inf 64.3%
Taylor expanded in y around 0 60.9%
+-commutative60.9%
mul-1-neg60.9%
Simplified60.9%
Taylor expanded in t around inf 59.9%
associate-*r*59.9%
neg-mul-159.9%
Simplified59.9%
Final simplification58.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.55e-33)
(* y t)
(if (<= y 140000000.0)
x
(if (or (<= y 2.2e+150) (not (<= y 3.8e+209))) (* y (- x)) (* y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.55e-33) {
tmp = y * t;
} else if (y <= 140000000.0) {
tmp = x;
} else if ((y <= 2.2e+150) || !(y <= 3.8e+209)) {
tmp = y * -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.55d-33)) then
tmp = y * t
else if (y <= 140000000.0d0) then
tmp = x
else if ((y <= 2.2d+150) .or. (.not. (y <= 3.8d+209))) then
tmp = y * -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.55e-33) {
tmp = y * t;
} else if (y <= 140000000.0) {
tmp = x;
} else if ((y <= 2.2e+150) || !(y <= 3.8e+209)) {
tmp = y * -x;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.55e-33: tmp = y * t elif y <= 140000000.0: tmp = x elif (y <= 2.2e+150) or not (y <= 3.8e+209): tmp = y * -x else: tmp = y * t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.55e-33) tmp = Float64(y * t); elseif (y <= 140000000.0) tmp = x; elseif ((y <= 2.2e+150) || !(y <= 3.8e+209)) tmp = Float64(y * Float64(-x)); else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.55e-33) tmp = y * t; elseif (y <= 140000000.0) tmp = x; elseif ((y <= 2.2e+150) || ~((y <= 3.8e+209))) tmp = y * -x; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.55e-33], N[(y * t), $MachinePrecision], If[LessEqual[y, 140000000.0], x, If[Or[LessEqual[y, 2.2e+150], N[Not[LessEqual[y, 3.8e+209]], $MachinePrecision]], N[(y * (-x)), $MachinePrecision], N[(y * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-33}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq 140000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+150} \lor \neg \left(y \leq 3.8 \cdot 10^{+209}\right):\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if y < -1.54999999999999998e-33 or 2.19999999999999999e150 < y < 3.79999999999999984e209Initial program 100.0%
Taylor expanded in t around inf 58.9%
Taylor expanded in z around 0 46.2%
+-commutative46.2%
Simplified46.2%
Taylor expanded in t around inf 43.3%
*-commutative43.3%
Simplified43.3%
if -1.54999999999999998e-33 < y < 1.4e8Initial program 100.0%
Taylor expanded in t around inf 76.6%
Taylor expanded in x around inf 35.4%
if 1.4e8 < y < 2.19999999999999999e150 or 3.79999999999999984e209 < y Initial program 100.0%
Taylor expanded in t around 0 70.2%
mul-1-neg70.2%
distribute-lft-neg-out70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in x around 0 70.2%
mul-1-neg70.2%
unsub-neg70.2%
Simplified70.2%
Taylor expanded in y around inf 57.0%
mul-1-neg57.0%
distribute-rgt-neg-out57.0%
Simplified57.0%
Final simplification42.7%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.6e+22)
(* z x)
(if (<= z 2.8e-154)
(+ x (* y t))
(if (<= z 7.3e+115) (* x (- 1.0 y)) (* z (- t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.6e+22) {
tmp = z * x;
} else if (z <= 2.8e-154) {
tmp = x + (y * t);
} else if (z <= 7.3e+115) {
tmp = x * (1.0 - y);
} else {
tmp = z * -t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.6d+22)) then
tmp = z * x
else if (z <= 2.8d-154) then
tmp = x + (y * t)
else if (z <= 7.3d+115) then
tmp = x * (1.0d0 - y)
else
tmp = z * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.6e+22) {
tmp = z * x;
} else if (z <= 2.8e-154) {
tmp = x + (y * t);
} else if (z <= 7.3e+115) {
tmp = x * (1.0 - y);
} else {
tmp = z * -t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.6e+22: tmp = z * x elif z <= 2.8e-154: tmp = x + (y * t) elif z <= 7.3e+115: tmp = x * (1.0 - y) else: tmp = z * -t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.6e+22) tmp = Float64(z * x); elseif (z <= 2.8e-154) tmp = Float64(x + Float64(y * t)); elseif (z <= 7.3e+115) tmp = Float64(x * Float64(1.0 - y)); else tmp = Float64(z * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.6e+22) tmp = z * x; elseif (z <= 2.8e-154) tmp = x + (y * t); elseif (z <= 7.3e+115) tmp = x * (1.0 - y); else tmp = z * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.6e+22], N[(z * x), $MachinePrecision], If[LessEqual[z, 2.8e-154], N[(x + N[(y * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.3e+115], N[(x * N[(1.0 - y), $MachinePrecision]), $MachinePrecision], N[(z * (-t)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+22}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-154}:\\
\;\;\;\;x + y \cdot t\\
\mathbf{elif}\;z \leq 7.3 \cdot 10^{+115}:\\
\;\;\;\;x \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-t\right)\\
\end{array}
\end{array}
if z < -1.6e22Initial program 100.0%
Taylor expanded in t around 0 58.6%
mul-1-neg58.6%
distribute-lft-neg-out58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in x around 0 58.6%
mul-1-neg58.6%
unsub-neg58.6%
Simplified58.6%
Taylor expanded in z around inf 50.3%
if -1.6e22 < z < 2.80000000000000012e-154Initial program 100.0%
Taylor expanded in t around inf 77.8%
Taylor expanded in z around 0 72.7%
+-commutative72.7%
Simplified72.7%
if 2.80000000000000012e-154 < z < 7.29999999999999968e115Initial program 100.0%
Taylor expanded in y around inf 76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in x around inf 55.4%
mul-1-neg55.4%
unsub-neg55.4%
Simplified55.4%
if 7.29999999999999968e115 < z Initial program 100.0%
Taylor expanded in t around inf 64.3%
Taylor expanded in y around 0 60.9%
+-commutative60.9%
mul-1-neg60.9%
Simplified60.9%
Taylor expanded in t around inf 59.9%
associate-*r*59.9%
neg-mul-159.9%
Simplified59.9%
Final simplification61.2%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.35e-69) (not (<= x 1.35e-137))) (* x (+ (- z y) 1.0)) (- x (* z t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.35e-69) || !(x <= 1.35e-137)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x - (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 ((x <= (-1.35d-69)) .or. (.not. (x <= 1.35d-137))) then
tmp = x * ((z - y) + 1.0d0)
else
tmp = x - (z * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.35e-69) || !(x <= 1.35e-137)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x - (z * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.35e-69) or not (x <= 1.35e-137): tmp = x * ((z - y) + 1.0) else: tmp = x - (z * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.35e-69) || !(x <= 1.35e-137)) tmp = Float64(x * Float64(Float64(z - y) + 1.0)); else tmp = Float64(x - Float64(z * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.35e-69) || ~((x <= 1.35e-137))) tmp = x * ((z - y) + 1.0); else tmp = x - (z * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.35e-69], N[Not[LessEqual[x, 1.35e-137]], $MachinePrecision]], N[(x * N[(N[(z - y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{-69} \lor \neg \left(x \leq 1.35 \cdot 10^{-137}\right):\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot t\\
\end{array}
\end{array}
if x < -1.3499999999999999e-69 or 1.34999999999999996e-137 < x Initial program 100.0%
Taylor expanded in t around 0 77.8%
mul-1-neg77.8%
distribute-lft-neg-out77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in x around 0 77.8%
mul-1-neg77.8%
unsub-neg77.8%
Simplified77.8%
if -1.3499999999999999e-69 < x < 1.34999999999999996e-137Initial program 100.0%
Taylor expanded in t around inf 88.1%
Taylor expanded in y around 0 57.1%
+-commutative57.1%
mul-1-neg57.1%
Simplified57.1%
Taylor expanded in t around 0 57.1%
mul-1-neg57.1%
sub-neg57.1%
Simplified57.1%
Final simplification70.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.05e-69) (not (<= x 9.5e-16))) (* x (+ (- z y) 1.0)) (+ x (* (- y z) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.05e-69) || !(x <= 9.5e-16)) {
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 ((x <= (-1.05d-69)) .or. (.not. (x <= 9.5d-16))) 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 ((x <= -1.05e-69) || !(x <= 9.5e-16)) {
tmp = x * ((z - y) + 1.0);
} else {
tmp = x + ((y - z) * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.05e-69) or not (x <= 9.5e-16): tmp = x * ((z - y) + 1.0) else: tmp = x + ((y - z) * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.05e-69) || !(x <= 9.5e-16)) 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 ((x <= -1.05e-69) || ~((x <= 9.5e-16))) tmp = x * ((z - y) + 1.0); else tmp = x + ((y - z) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.05e-69], N[Not[LessEqual[x, 9.5e-16]], $MachinePrecision]], 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}\;x \leq -1.05 \cdot 10^{-69} \lor \neg \left(x \leq 9.5 \cdot 10^{-16}\right):\\
\;\;\;\;x \cdot \left(\left(z - y\right) + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot t\\
\end{array}
\end{array}
if x < -1.05e-69 or 9.5000000000000005e-16 < x Initial program 100.0%
Taylor expanded in t around 0 82.8%
mul-1-neg82.8%
distribute-lft-neg-out82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in x around 0 82.8%
mul-1-neg82.8%
unsub-neg82.8%
Simplified82.8%
if -1.05e-69 < x < 9.5000000000000005e-16Initial program 100.0%
Taylor expanded in t around inf 82.8%
Final simplification82.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1e+23) (not (<= z 4.2e+41))) (+ x (* z (- x t))) (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1e+23) || !(z <= 4.2e+41)) {
tmp = x + (z * (x - t));
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1d+23)) .or. (.not. (z <= 4.2d+41))) then
tmp = x + (z * (x - t))
else
tmp = x + (y * (t - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1e+23) || !(z <= 4.2e+41)) {
tmp = x + (z * (x - t));
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1e+23) or not (z <= 4.2e+41): tmp = x + (z * (x - t)) else: tmp = x + (y * (t - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1e+23) || !(z <= 4.2e+41)) tmp = Float64(x + Float64(z * Float64(x - t))); else tmp = Float64(x + Float64(y * Float64(t - x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1e+23) || ~((z <= 4.2e+41))) tmp = x + (z * (x - t)); else tmp = x + (y * (t - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1e+23], N[Not[LessEqual[z, 4.2e+41]], $MachinePrecision]], N[(x + N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+23} \lor \neg \left(z \leq 4.2 \cdot 10^{+41}\right):\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -9.9999999999999992e22 or 4.1999999999999999e41 < z Initial program 100.0%
Taylor expanded in y around 0 82.9%
mul-1-neg82.9%
distribute-lft-neg-out82.9%
*-commutative82.9%
Simplified82.9%
if -9.9999999999999992e22 < z < 4.1999999999999999e41Initial program 100.0%
Taylor expanded in y around inf 90.8%
*-commutative90.8%
Simplified90.8%
Final simplification87.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -0.28) (not (<= z 2.8e-28))) (* z x) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -0.28) || !(z <= 2.8e-28)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-0.28d0)) .or. (.not. (z <= 2.8d-28))) then
tmp = z * x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -0.28) || !(z <= 2.8e-28)) {
tmp = z * x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -0.28) or not (z <= 2.8e-28): tmp = z * x else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -0.28) || !(z <= 2.8e-28)) tmp = Float64(z * x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -0.28) || ~((z <= 2.8e-28))) tmp = z * x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -0.28], N[Not[LessEqual[z, 2.8e-28]], $MachinePrecision]], N[(z * x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.28 \lor \neg \left(z \leq 2.8 \cdot 10^{-28}\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -0.28000000000000003 or 2.7999999999999998e-28 < z Initial program 100.0%
Taylor expanded in t around 0 54.0%
mul-1-neg54.0%
distribute-lft-neg-out54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in x around 0 54.0%
mul-1-neg54.0%
unsub-neg54.0%
Simplified54.0%
Taylor expanded in z around inf 37.8%
if -0.28000000000000003 < z < 2.7999999999999998e-28Initial program 100.0%
Taylor expanded in t around inf 74.2%
Taylor expanded in x around inf 34.6%
Final simplification36.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.7e-31) (not (<= y 6e-99))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.7e-31) || !(y <= 6e-99)) {
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.7d-31)) .or. (.not. (y <= 6d-99))) 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.7e-31) || !(y <= 6e-99)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.7e-31) or not (y <= 6e-99): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.7e-31) || !(y <= 6e-99)) 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.7e-31) || ~((y <= 6e-99))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.7e-31], N[Not[LessEqual[y, 6e-99]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{-31} \lor \neg \left(y \leq 6 \cdot 10^{-99}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.6999999999999998e-31 or 6.00000000000000012e-99 < y Initial program 100.0%
Taylor expanded in t around inf 53.6%
Taylor expanded in z around 0 39.7%
+-commutative39.7%
Simplified39.7%
Taylor expanded in t around inf 36.5%
*-commutative36.5%
Simplified36.5%
if -3.6999999999999998e-31 < y < 6.00000000000000012e-99Initial program 100.0%
Taylor expanded in t around inf 76.2%
Taylor expanded in x around inf 38.6%
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%
Final simplification100.0%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 100.0%
Taylor expanded in t around inf 62.3%
Taylor expanded in x around inf 18.0%
Final simplification18.0%
(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 2024029
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:herbie-target
(+ x (+ (* t (- y z)) (* (- x) (- y z))))
(+ x (* (- y z) (- t x))))