
(FPCore (x y z t) :precision binary64 (+ (* (/ x y) (- z t)) t))
double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + t;
}
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)) + t
end function
public static double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + t;
}
def code(x, y, z, t): return ((x / y) * (z - t)) + t
function code(x, y, z, t) return Float64(Float64(Float64(x / y) * Float64(z - t)) + t) end
function tmp = code(x, y, z, t) tmp = ((x / y) * (z - t)) + t; end
code[x_, y_, z_, t_] := N[(N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} \cdot \left(z - t\right) + t
\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)) t))
double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + t;
}
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)) + t
end function
public static double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + t;
}
def code(x, y, z, t): return ((x / y) * (z - t)) + t
function code(x, y, z, t) return Float64(Float64(Float64(x / y) * Float64(z - t)) + t) end
function tmp = code(x, y, z, t) tmp = ((x / y) * (z - t)) + t; end
code[x_, y_, z_, t_] := N[(N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} \cdot \left(z - t\right) + t
\end{array}
(FPCore (x y z t) :precision binary64 (+ t (/ (- z t) (/ y x))))
double code(double x, double y, double z, double t) {
return t + ((z - t) / (y / 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 = t + ((z - t) / (y / x))
end function
public static double code(double x, double y, double z, double t) {
return t + ((z - t) / (y / x));
}
def code(x, y, z, t): return t + ((z - t) / (y / x))
function code(x, y, z, t) return Float64(t + Float64(Float64(z - t) / Float64(y / x))) end
function tmp = code(x, y, z, t) tmp = t + ((z - t) / (y / x)); end
code[x_, y_, z_, t_] := N[(t + N[(N[(z - t), $MachinePrecision] / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t + \frac{z - t}{\frac{y}{x}}
\end{array}
Initial program 97.9%
*-commutative97.9%
clear-num97.6%
un-div-inv98.0%
Applied egg-rr98.0%
Final simplification98.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ x y))) (t_2 (/ (* z x) y)))
(if (<= (/ x y) -2e+188)
t_2
(if (<= (/ x y) -5e+70)
(/ (* t x) (- y))
(if (<= (/ x y) -2e-66)
t_1
(if (<= (/ x y) 1e-65)
t
(if (<= (/ x y) 5e+32)
t_1
(if (<= (/ x y) 1e+207) (* t (/ x (- y))) t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x / y);
double t_2 = (z * x) / y;
double tmp;
if ((x / y) <= -2e+188) {
tmp = t_2;
} else if ((x / y) <= -5e+70) {
tmp = (t * x) / -y;
} else if ((x / y) <= -2e-66) {
tmp = t_1;
} else if ((x / y) <= 1e-65) {
tmp = t;
} else if ((x / y) <= 5e+32) {
tmp = t_1;
} else if ((x / y) <= 1e+207) {
tmp = t * (x / -y);
} 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) :: tmp
t_1 = z * (x / y)
t_2 = (z * x) / y
if ((x / y) <= (-2d+188)) then
tmp = t_2
else if ((x / y) <= (-5d+70)) then
tmp = (t * x) / -y
else if ((x / y) <= (-2d-66)) then
tmp = t_1
else if ((x / y) <= 1d-65) then
tmp = t
else if ((x / y) <= 5d+32) then
tmp = t_1
else if ((x / y) <= 1d+207) then
tmp = t * (x / -y)
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 * (x / y);
double t_2 = (z * x) / y;
double tmp;
if ((x / y) <= -2e+188) {
tmp = t_2;
} else if ((x / y) <= -5e+70) {
tmp = (t * x) / -y;
} else if ((x / y) <= -2e-66) {
tmp = t_1;
} else if ((x / y) <= 1e-65) {
tmp = t;
} else if ((x / y) <= 5e+32) {
tmp = t_1;
} else if ((x / y) <= 1e+207) {
tmp = t * (x / -y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x / y) t_2 = (z * x) / y tmp = 0 if (x / y) <= -2e+188: tmp = t_2 elif (x / y) <= -5e+70: tmp = (t * x) / -y elif (x / y) <= -2e-66: tmp = t_1 elif (x / y) <= 1e-65: tmp = t elif (x / y) <= 5e+32: tmp = t_1 elif (x / y) <= 1e+207: tmp = t * (x / -y) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x / y)) t_2 = Float64(Float64(z * x) / y) tmp = 0.0 if (Float64(x / y) <= -2e+188) tmp = t_2; elseif (Float64(x / y) <= -5e+70) tmp = Float64(Float64(t * x) / Float64(-y)); elseif (Float64(x / y) <= -2e-66) tmp = t_1; elseif (Float64(x / y) <= 1e-65) tmp = t; elseif (Float64(x / y) <= 5e+32) tmp = t_1; elseif (Float64(x / y) <= 1e+207) tmp = Float64(t * Float64(x / Float64(-y))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x / y); t_2 = (z * x) / y; tmp = 0.0; if ((x / y) <= -2e+188) tmp = t_2; elseif ((x / y) <= -5e+70) tmp = (t * x) / -y; elseif ((x / y) <= -2e-66) tmp = t_1; elseif ((x / y) <= 1e-65) tmp = t; elseif ((x / y) <= 5e+32) tmp = t_1; elseif ((x / y) <= 1e+207) tmp = t * (x / -y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -2e+188], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], -5e+70], N[(N[(t * x), $MachinePrecision] / (-y)), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], -2e-66], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 1e-65], t, If[LessEqual[N[(x / y), $MachinePrecision], 5e+32], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 1e+207], N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{x}{y}\\
t_2 := \frac{z \cdot x}{y}\\
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+188}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq -5 \cdot 10^{+70}:\\
\;\;\;\;\frac{t \cdot x}{-y}\\
\mathbf{elif}\;\frac{x}{y} \leq -2 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-65}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+207}:\\
\;\;\;\;t \cdot \frac{x}{-y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 x y) < -2e188 or 1e207 < (/.f64 x y) Initial program 93.2%
Taylor expanded in x around 0 98.2%
Taylor expanded in x around -inf 98.2%
Taylor expanded in z around inf 71.9%
if -2e188 < (/.f64 x y) < -5.0000000000000002e70Initial program 99.7%
Taylor expanded in x around 0 93.7%
Taylor expanded in x around -inf 93.7%
Taylor expanded in z around 0 80.3%
mul-1-neg80.3%
distribute-lft-neg-out80.3%
*-commutative80.3%
Simplified80.3%
if -5.0000000000000002e70 < (/.f64 x y) < -2e-66 or 9.99999999999999923e-66 < (/.f64 x y) < 4.9999999999999997e32Initial program 99.8%
Taylor expanded in x around 0 84.3%
Taylor expanded in x around -inf 71.7%
Taylor expanded in z around inf 54.2%
associate-*l/66.2%
*-commutative66.2%
Simplified66.2%
if -2e-66 < (/.f64 x y) < 9.99999999999999923e-66Initial program 98.8%
Taylor expanded in x around 0 84.4%
if 4.9999999999999997e32 < (/.f64 x y) < 1e207Initial program 99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in z around 0 66.3%
associate-*r/69.6%
associate-*r*69.6%
neg-mul-169.6%
cancel-sign-sub-inv69.6%
Simplified69.6%
clear-num69.4%
un-div-inv69.4%
Applied egg-rr69.4%
Taylor expanded in y around 0 66.3%
mul-1-neg66.3%
associate-*r/69.6%
distribute-lft-neg-out69.6%
*-commutative69.6%
Simplified69.6%
Final simplification76.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x (- y)))) (t_2 (* z (/ x y))) (t_3 (/ (* z x) y)))
(if (<= (/ x y) -2e+188)
t_3
(if (<= (/ x y) -5e+70)
t_1
(if (<= (/ x y) -2e-66)
t_2
(if (<= (/ x y) 1e-65)
t
(if (<= (/ x y) 5e+32) t_2 (if (<= (/ x y) 1e+207) t_1 t_3))))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / -y);
double t_2 = z * (x / y);
double t_3 = (z * x) / y;
double tmp;
if ((x / y) <= -2e+188) {
tmp = t_3;
} else if ((x / y) <= -5e+70) {
tmp = t_1;
} else if ((x / y) <= -2e-66) {
tmp = t_2;
} else if ((x / y) <= 1e-65) {
tmp = t;
} else if ((x / y) <= 5e+32) {
tmp = t_2;
} else if ((x / y) <= 1e+207) {
tmp = t_1;
} else {
tmp = t_3;
}
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 = t * (x / -y)
t_2 = z * (x / y)
t_3 = (z * x) / y
if ((x / y) <= (-2d+188)) then
tmp = t_3
else if ((x / y) <= (-5d+70)) then
tmp = t_1
else if ((x / y) <= (-2d-66)) then
tmp = t_2
else if ((x / y) <= 1d-65) then
tmp = t
else if ((x / y) <= 5d+32) then
tmp = t_2
else if ((x / y) <= 1d+207) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (x / -y);
double t_2 = z * (x / y);
double t_3 = (z * x) / y;
double tmp;
if ((x / y) <= -2e+188) {
tmp = t_3;
} else if ((x / y) <= -5e+70) {
tmp = t_1;
} else if ((x / y) <= -2e-66) {
tmp = t_2;
} else if ((x / y) <= 1e-65) {
tmp = t;
} else if ((x / y) <= 5e+32) {
tmp = t_2;
} else if ((x / y) <= 1e+207) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / -y) t_2 = z * (x / y) t_3 = (z * x) / y tmp = 0 if (x / y) <= -2e+188: tmp = t_3 elif (x / y) <= -5e+70: tmp = t_1 elif (x / y) <= -2e-66: tmp = t_2 elif (x / y) <= 1e-65: tmp = t elif (x / y) <= 5e+32: tmp = t_2 elif (x / y) <= 1e+207: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / Float64(-y))) t_2 = Float64(z * Float64(x / y)) t_3 = Float64(Float64(z * x) / y) tmp = 0.0 if (Float64(x / y) <= -2e+188) tmp = t_3; elseif (Float64(x / y) <= -5e+70) tmp = t_1; elseif (Float64(x / y) <= -2e-66) tmp = t_2; elseif (Float64(x / y) <= 1e-65) tmp = t; elseif (Float64(x / y) <= 5e+32) tmp = t_2; elseif (Float64(x / y) <= 1e+207) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / -y); t_2 = z * (x / y); t_3 = (z * x) / y; tmp = 0.0; if ((x / y) <= -2e+188) tmp = t_3; elseif ((x / y) <= -5e+70) tmp = t_1; elseif ((x / y) <= -2e-66) tmp = t_2; elseif ((x / y) <= 1e-65) tmp = t; elseif ((x / y) <= 5e+32) tmp = t_2; elseif ((x / y) <= 1e+207) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -2e+188], t$95$3, If[LessEqual[N[(x / y), $MachinePrecision], -5e+70], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -2e-66], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], 1e-65], t, If[LessEqual[N[(x / y), $MachinePrecision], 5e+32], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], 1e+207], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{-y}\\
t_2 := z \cdot \frac{x}{y}\\
t_3 := \frac{z \cdot x}{y}\\
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+188}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;\frac{x}{y} \leq -5 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq -2 \cdot 10^{-66}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-65}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 x y) < -2e188 or 1e207 < (/.f64 x y) Initial program 93.2%
Taylor expanded in x around 0 98.2%
Taylor expanded in x around -inf 98.2%
Taylor expanded in z around inf 71.9%
if -2e188 < (/.f64 x y) < -5.0000000000000002e70 or 4.9999999999999997e32 < (/.f64 x y) < 1e207Initial program 99.8%
*-commutative99.8%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 71.2%
associate-*r/73.3%
associate-*r*73.3%
neg-mul-173.3%
cancel-sign-sub-inv73.3%
Simplified73.3%
clear-num73.1%
un-div-inv73.3%
Applied egg-rr73.3%
Taylor expanded in y around 0 71.2%
mul-1-neg71.2%
associate-*r/73.3%
distribute-lft-neg-out73.3%
*-commutative73.3%
Simplified73.3%
if -5.0000000000000002e70 < (/.f64 x y) < -2e-66 or 9.99999999999999923e-66 < (/.f64 x y) < 4.9999999999999997e32Initial program 99.8%
Taylor expanded in x around 0 84.3%
Taylor expanded in x around -inf 71.7%
Taylor expanded in z around inf 54.2%
associate-*l/66.2%
*-commutative66.2%
Simplified66.2%
if -2e-66 < (/.f64 x y) < 9.99999999999999923e-66Initial program 98.8%
Taylor expanded in x around 0 84.4%
Final simplification76.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t (- y)))) (t_2 (* z (/ x y))) (t_3 (/ (* z x) y)))
(if (<= (/ x y) -2e+188)
t_3
(if (<= (/ x y) -5e+70)
t_1
(if (<= (/ x y) -2e-66)
t_2
(if (<= (/ x y) 1e-65)
t
(if (<= (/ x y) 5e+32) t_2 (if (<= (/ x y) 1e+207) t_1 t_3))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / -y);
double t_2 = z * (x / y);
double t_3 = (z * x) / y;
double tmp;
if ((x / y) <= -2e+188) {
tmp = t_3;
} else if ((x / y) <= -5e+70) {
tmp = t_1;
} else if ((x / y) <= -2e-66) {
tmp = t_2;
} else if ((x / y) <= 1e-65) {
tmp = t;
} else if ((x / y) <= 5e+32) {
tmp = t_2;
} else if ((x / y) <= 1e+207) {
tmp = t_1;
} else {
tmp = t_3;
}
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 = x * (t / -y)
t_2 = z * (x / y)
t_3 = (z * x) / y
if ((x / y) <= (-2d+188)) then
tmp = t_3
else if ((x / y) <= (-5d+70)) then
tmp = t_1
else if ((x / y) <= (-2d-66)) then
tmp = t_2
else if ((x / y) <= 1d-65) then
tmp = t
else if ((x / y) <= 5d+32) then
tmp = t_2
else if ((x / y) <= 1d+207) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t / -y);
double t_2 = z * (x / y);
double t_3 = (z * x) / y;
double tmp;
if ((x / y) <= -2e+188) {
tmp = t_3;
} else if ((x / y) <= -5e+70) {
tmp = t_1;
} else if ((x / y) <= -2e-66) {
tmp = t_2;
} else if ((x / y) <= 1e-65) {
tmp = t;
} else if ((x / y) <= 5e+32) {
tmp = t_2;
} else if ((x / y) <= 1e+207) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / -y) t_2 = z * (x / y) t_3 = (z * x) / y tmp = 0 if (x / y) <= -2e+188: tmp = t_3 elif (x / y) <= -5e+70: tmp = t_1 elif (x / y) <= -2e-66: tmp = t_2 elif (x / y) <= 1e-65: tmp = t elif (x / y) <= 5e+32: tmp = t_2 elif (x / y) <= 1e+207: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / Float64(-y))) t_2 = Float64(z * Float64(x / y)) t_3 = Float64(Float64(z * x) / y) tmp = 0.0 if (Float64(x / y) <= -2e+188) tmp = t_3; elseif (Float64(x / y) <= -5e+70) tmp = t_1; elseif (Float64(x / y) <= -2e-66) tmp = t_2; elseif (Float64(x / y) <= 1e-65) tmp = t; elseif (Float64(x / y) <= 5e+32) tmp = t_2; elseif (Float64(x / y) <= 1e+207) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / -y); t_2 = z * (x / y); t_3 = (z * x) / y; tmp = 0.0; if ((x / y) <= -2e+188) tmp = t_3; elseif ((x / y) <= -5e+70) tmp = t_1; elseif ((x / y) <= -2e-66) tmp = t_2; elseif ((x / y) <= 1e-65) tmp = t; elseif ((x / y) <= 5e+32) tmp = t_2; elseif ((x / y) <= 1e+207) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / (-y)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * x), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -2e+188], t$95$3, If[LessEqual[N[(x / y), $MachinePrecision], -5e+70], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -2e-66], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], 1e-65], t, If[LessEqual[N[(x / y), $MachinePrecision], 5e+32], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], 1e+207], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{-y}\\
t_2 := z \cdot \frac{x}{y}\\
t_3 := \frac{z \cdot x}{y}\\
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+188}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;\frac{x}{y} \leq -5 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq -2 \cdot 10^{-66}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-65}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 x y) < -2e188 or 1e207 < (/.f64 x y) Initial program 93.2%
Taylor expanded in x around 0 98.2%
Taylor expanded in x around -inf 98.2%
Taylor expanded in z around inf 71.9%
if -2e188 < (/.f64 x y) < -5.0000000000000002e70 or 4.9999999999999997e32 < (/.f64 x y) < 1e207Initial program 99.8%
*-commutative99.8%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 71.2%
associate-*r/73.3%
associate-*r*73.3%
neg-mul-173.3%
cancel-sign-sub-inv73.3%
Simplified73.3%
clear-num73.1%
un-div-inv73.3%
Applied egg-rr73.3%
Taylor expanded in y around 0 71.2%
associate-*l/64.8%
*-commutative64.8%
neg-mul-164.8%
distribute-rgt-neg-in64.8%
distribute-frac-neg264.8%
Simplified64.8%
if -5.0000000000000002e70 < (/.f64 x y) < -2e-66 or 9.99999999999999923e-66 < (/.f64 x y) < 4.9999999999999997e32Initial program 99.8%
Taylor expanded in x around 0 84.3%
Taylor expanded in x around -inf 71.7%
Taylor expanded in z around inf 54.2%
associate-*l/66.2%
*-commutative66.2%
Simplified66.2%
if -2e-66 < (/.f64 x y) < 9.99999999999999923e-66Initial program 98.8%
Taylor expanded in x around 0 84.4%
Final simplification74.9%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -10000000000.0) (not (<= (/ x y) 5e-8))) (/ (* (- z t) x) y) (+ t (/ z (/ y x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -10000000000.0) || !((x / y) <= 5e-8)) {
tmp = ((z - t) * x) / y;
} else {
tmp = t + (z / (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 (((x / y) <= (-10000000000.0d0)) .or. (.not. ((x / y) <= 5d-8))) then
tmp = ((z - t) * x) / y
else
tmp = t + (z / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -10000000000.0) || !((x / y) <= 5e-8)) {
tmp = ((z - t) * x) / y;
} else {
tmp = t + (z / (y / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -10000000000.0) or not ((x / y) <= 5e-8): tmp = ((z - t) * x) / y else: tmp = t + (z / (y / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -10000000000.0) || !(Float64(x / y) <= 5e-8)) tmp = Float64(Float64(Float64(z - t) * x) / y); else tmp = Float64(t + Float64(z / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -10000000000.0) || ~(((x / y) <= 5e-8))) tmp = ((z - t) * x) / y; else tmp = t + (z / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -10000000000.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 5e-8]], $MachinePrecision]], N[(N[(N[(z - t), $MachinePrecision] * x), $MachinePrecision] / y), $MachinePrecision], N[(t + N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -10000000000 \lor \neg \left(\frac{x}{y} \leq 5 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{\left(z - t\right) \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{z}{\frac{y}{x}}\\
\end{array}
\end{array}
if (/.f64 x y) < -1e10 or 4.9999999999999998e-8 < (/.f64 x y) Initial program 96.8%
Taylor expanded in x around 0 95.3%
Taylor expanded in x around -inf 93.3%
if -1e10 < (/.f64 x y) < 4.9999999999999998e-8Initial program 98.9%
Taylor expanded in z around inf 94.7%
associate-/l*95.6%
Simplified95.6%
*-commutative95.6%
associate-/r/98.4%
Applied egg-rr98.4%
Final simplification95.9%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -2e-66) (not (<= (/ x y) 1e-65))) (* z (/ x y)) t))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -2e-66) || !((x / y) <= 1e-65)) {
tmp = z * (x / y);
} else {
tmp = 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 / y) <= (-2d-66)) .or. (.not. ((x / y) <= 1d-65))) then
tmp = z * (x / y)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -2e-66) || !((x / y) <= 1e-65)) {
tmp = z * (x / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -2e-66) or not ((x / y) <= 1e-65): tmp = z * (x / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -2e-66) || !(Float64(x / y) <= 1e-65)) tmp = Float64(z * Float64(x / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -2e-66) || ~(((x / y) <= 1e-65))) tmp = z * (x / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -2e-66], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1e-65]], $MachinePrecision]], N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision], t]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{-66} \lor \neg \left(\frac{x}{y} \leq 10^{-65}\right):\\
\;\;\;\;z \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if (/.f64 x y) < -2e-66 or 9.99999999999999923e-66 < (/.f64 x y) Initial program 97.3%
Taylor expanded in x around 0 92.3%
Taylor expanded in x around -inf 88.1%
Taylor expanded in z around inf 52.6%
associate-*l/56.5%
*-commutative56.5%
Simplified56.5%
if -2e-66 < (/.f64 x y) < 9.99999999999999923e-66Initial program 98.8%
Taylor expanded in x around 0 84.4%
Final simplification68.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.65) (not (<= t 4.9e-64))) (* t (- 1.0 (/ x y))) (+ t (* x (/ z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.65) || !(t <= 4.9e-64)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t + (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 <= (-1.65d0)) .or. (.not. (t <= 4.9d-64))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = t + (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 <= -1.65) || !(t <= 4.9e-64)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t + (x * (z / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.65) or not (t <= 4.9e-64): tmp = t * (1.0 - (x / y)) else: tmp = t + (x * (z / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.65) || !(t <= 4.9e-64)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(t + Float64(x * Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.65) || ~((t <= 4.9e-64))) tmp = t * (1.0 - (x / y)); else tmp = t + (x * (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.65], N[Not[LessEqual[t, 4.9e-64]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \lor \neg \left(t \leq 4.9 \cdot 10^{-64}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t + x \cdot \frac{z}{y}\\
\end{array}
\end{array}
if t < -1.6499999999999999 or 4.9000000000000002e-64 < t Initial program 99.2%
Taylor expanded in z around 0 86.6%
mul-1-neg86.6%
unsub-neg86.6%
*-rgt-identity86.6%
associate-/l*91.6%
distribute-lft-out--91.6%
Simplified91.6%
if -1.6499999999999999 < t < 4.9000000000000002e-64Initial program 96.5%
Taylor expanded in z around inf 80.9%
associate-/l*84.9%
Simplified84.9%
Final simplification88.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.4e-194) (not (<= t 1.2e-150))) (* t (- 1.0 (/ x y))) (* z (/ x y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.4e-194) || !(t <= 1.2e-150)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = z * (x / 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 <= (-1.4d-194)) .or. (.not. (t <= 1.2d-150))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = z * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.4e-194) || !(t <= 1.2e-150)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = z * (x / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.4e-194) or not (t <= 1.2e-150): tmp = t * (1.0 - (x / y)) else: tmp = z * (x / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.4e-194) || !(t <= 1.2e-150)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(z * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.4e-194) || ~((t <= 1.2e-150))) tmp = t * (1.0 - (x / y)); else tmp = z * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.4e-194], N[Not[LessEqual[t, 1.2e-150]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-194} \lor \neg \left(t \leq 1.2 \cdot 10^{-150}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{x}{y}\\
\end{array}
\end{array}
if t < -1.40000000000000006e-194 or 1.2e-150 < t Initial program 98.9%
Taylor expanded in z around 0 77.7%
mul-1-neg77.7%
unsub-neg77.7%
*-rgt-identity77.7%
associate-/l*81.7%
distribute-lft-out--81.7%
Simplified81.7%
if -1.40000000000000006e-194 < t < 1.2e-150Initial program 95.0%
Taylor expanded in x around 0 89.1%
Taylor expanded in x around -inf 73.2%
Taylor expanded in z around inf 68.8%
associate-*l/75.8%
*-commutative75.8%
Simplified75.8%
Final simplification80.2%
(FPCore (x y z t) :precision binary64 (if (<= z -1.9e-105) (+ t (* x (/ z y))) (if (<= z 5.5e-44) (- t (/ t (/ y x))) (+ t (/ z (/ y x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.9e-105) {
tmp = t + (x * (z / y));
} else if (z <= 5.5e-44) {
tmp = t - (t / (y / x));
} else {
tmp = t + (z / (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 (z <= (-1.9d-105)) then
tmp = t + (x * (z / y))
else if (z <= 5.5d-44) then
tmp = t - (t / (y / x))
else
tmp = t + (z / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.9e-105) {
tmp = t + (x * (z / y));
} else if (z <= 5.5e-44) {
tmp = t - (t / (y / x));
} else {
tmp = t + (z / (y / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.9e-105: tmp = t + (x * (z / y)) elif z <= 5.5e-44: tmp = t - (t / (y / x)) else: tmp = t + (z / (y / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.9e-105) tmp = Float64(t + Float64(x * Float64(z / y))); elseif (z <= 5.5e-44) tmp = Float64(t - Float64(t / Float64(y / x))); else tmp = Float64(t + Float64(z / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.9e-105) tmp = t + (x * (z / y)); elseif (z <= 5.5e-44) tmp = t - (t / (y / x)); else tmp = t + (z / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.9e-105], N[(t + N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-44], N[(t - N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-105}:\\
\;\;\;\;t + x \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-44}:\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{z}{\frac{y}{x}}\\
\end{array}
\end{array}
if z < -1.8999999999999999e-105Initial program 97.6%
Taylor expanded in z around inf 87.6%
associate-/l*92.5%
Simplified92.5%
if -1.8999999999999999e-105 < z < 5.49999999999999993e-44Initial program 97.0%
*-commutative97.0%
clear-num96.9%
un-div-inv97.2%
Applied egg-rr97.2%
Taylor expanded in z around 0 87.0%
associate-*r/89.7%
associate-*r*89.7%
neg-mul-189.7%
cancel-sign-sub-inv89.7%
Simplified89.7%
clear-num89.6%
un-div-inv89.9%
Applied egg-rr89.9%
if 5.49999999999999993e-44 < z Initial program 99.9%
Taylor expanded in z around inf 80.1%
associate-/l*78.3%
Simplified78.3%
*-commutative78.3%
associate-/r/85.7%
Applied egg-rr85.7%
Final simplification89.8%
(FPCore (x y z t) :precision binary64 (if (<= z -4.8e-103) (+ t (* x (/ z y))) (if (<= z 8.2e-45) (- t (* t (/ x y))) (+ t (/ z (/ y x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.8e-103) {
tmp = t + (x * (z / y));
} else if (z <= 8.2e-45) {
tmp = t - (t * (x / y));
} else {
tmp = t + (z / (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 (z <= (-4.8d-103)) then
tmp = t + (x * (z / y))
else if (z <= 8.2d-45) then
tmp = t - (t * (x / y))
else
tmp = t + (z / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.8e-103) {
tmp = t + (x * (z / y));
} else if (z <= 8.2e-45) {
tmp = t - (t * (x / y));
} else {
tmp = t + (z / (y / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.8e-103: tmp = t + (x * (z / y)) elif z <= 8.2e-45: tmp = t - (t * (x / y)) else: tmp = t + (z / (y / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.8e-103) tmp = Float64(t + Float64(x * Float64(z / y))); elseif (z <= 8.2e-45) tmp = Float64(t - Float64(t * Float64(x / y))); else tmp = Float64(t + Float64(z / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -4.8e-103) tmp = t + (x * (z / y)); elseif (z <= 8.2e-45) tmp = t - (t * (x / y)); else tmp = t + (z / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.8e-103], N[(t + N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-45], N[(t - N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-103}:\\
\;\;\;\;t + x \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-45}:\\
\;\;\;\;t - t \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{z}{\frac{y}{x}}\\
\end{array}
\end{array}
if z < -4.8000000000000004e-103Initial program 97.6%
Taylor expanded in z around inf 87.6%
associate-/l*92.5%
Simplified92.5%
if -4.8000000000000004e-103 < z < 8.1999999999999998e-45Initial program 97.0%
*-commutative97.0%
clear-num96.9%
un-div-inv97.2%
Applied egg-rr97.2%
Taylor expanded in z around 0 87.0%
associate-*r/89.7%
associate-*r*89.7%
neg-mul-189.7%
cancel-sign-sub-inv89.7%
Simplified89.7%
if 8.1999999999999998e-45 < z Initial program 99.9%
Taylor expanded in z around inf 80.1%
associate-/l*78.3%
Simplified78.3%
*-commutative78.3%
associate-/r/85.7%
Applied egg-rr85.7%
Final simplification89.7%
(FPCore (x y z t) :precision binary64 (if (<= z -2.1e-105) (+ t (* x (/ z y))) (if (<= z 1.1e-44) (* t (- 1.0 (/ x y))) (+ t (/ z (/ y x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e-105) {
tmp = t + (x * (z / y));
} else if (z <= 1.1e-44) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t + (z / (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 (z <= (-2.1d-105)) then
tmp = t + (x * (z / y))
else if (z <= 1.1d-44) then
tmp = t * (1.0d0 - (x / y))
else
tmp = t + (z / (y / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e-105) {
tmp = t + (x * (z / y));
} else if (z <= 1.1e-44) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t + (z / (y / x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.1e-105: tmp = t + (x * (z / y)) elif z <= 1.1e-44: tmp = t * (1.0 - (x / y)) else: tmp = t + (z / (y / x)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.1e-105) tmp = Float64(t + Float64(x * Float64(z / y))); elseif (z <= 1.1e-44) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(t + Float64(z / Float64(y / x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.1e-105) tmp = t + (x * (z / y)); elseif (z <= 1.1e-44) tmp = t * (1.0 - (x / y)); else tmp = t + (z / (y / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.1e-105], N[(t + N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1e-44], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-105}:\\
\;\;\;\;t + x \cdot \frac{z}{y}\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-44}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{z}{\frac{y}{x}}\\
\end{array}
\end{array}
if z < -2.1e-105Initial program 97.6%
Taylor expanded in z around inf 87.6%
associate-/l*92.5%
Simplified92.5%
if -2.1e-105 < z < 1.10000000000000006e-44Initial program 97.0%
Taylor expanded in z around 0 87.0%
mul-1-neg87.0%
unsub-neg87.0%
*-rgt-identity87.0%
associate-/l*89.7%
distribute-lft-out--89.6%
Simplified89.6%
if 1.10000000000000006e-44 < z Initial program 99.9%
Taylor expanded in z around inf 80.1%
associate-/l*78.3%
Simplified78.3%
*-commutative78.3%
associate-/r/85.7%
Applied egg-rr85.7%
Final simplification89.7%
(FPCore (x y z t) :precision binary64 (if (<= t -8.4e+65) (* y (/ t y)) t))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.4e+65) {
tmp = y * (t / y);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-8.4d+65)) then
tmp = y * (t / y)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.4e+65) {
tmp = y * (t / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -8.4e+65: tmp = y * (t / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -8.4e+65) tmp = Float64(y * Float64(t / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -8.4e+65) tmp = y * (t / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -8.4e+65], N[(y * N[(t / y), $MachinePrecision]), $MachinePrecision], t]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.4 \cdot 10^{+65}:\\
\;\;\;\;y \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if t < -8.39999999999999965e65Initial program 100.0%
Taylor expanded in z around 0 82.8%
mul-1-neg82.8%
*-commutative82.8%
associate-/l*82.7%
distribute-rgt-neg-in82.7%
distribute-neg-frac282.7%
Simplified82.7%
Taylor expanded in y around 0 59.5%
neg-mul-159.5%
+-commutative59.5%
distribute-rgt-neg-in59.5%
distribute-lft-out62.3%
Simplified62.3%
Taylor expanded in y around inf 28.5%
*-commutative28.5%
associate-/l*60.6%
Applied egg-rr60.6%
if -8.39999999999999965e65 < t Initial program 97.5%
Taylor expanded in x around 0 36.7%
(FPCore (x y z t) :precision binary64 (+ t (* (- z t) (/ x y))))
double code(double x, double y, double z, double t) {
return t + ((z - t) * (x / y));
}
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 = t + ((z - t) * (x / y))
end function
public static double code(double x, double y, double z, double t) {
return t + ((z - t) * (x / y));
}
def code(x, y, z, t): return t + ((z - t) * (x / y))
function code(x, y, z, t) return Float64(t + Float64(Float64(z - t) * Float64(x / y))) end
function tmp = code(x, y, z, t) tmp = t + ((z - t) * (x / y)); end
code[x_, y_, z_, t_] := N[(t + N[(N[(z - t), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t + \left(z - t\right) \cdot \frac{x}{y}
\end{array}
Initial program 97.9%
Final simplification97.9%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return t;
}
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 = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 97.9%
Taylor expanded in x around 0 38.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (* (/ x y) (- z t)) t)))
(if (< z 2.759456554562692e-282)
t_1
(if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = ((x / y) * (z - t)) + t;
double tmp;
if (z < 2.759456554562692e-282) {
tmp = t_1;
} else if (z < 2.326994450874436e-110) {
tmp = (x * ((z - t) / 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 = ((x / y) * (z - t)) + t
if (z < 2.759456554562692d-282) then
tmp = t_1
else if (z < 2.326994450874436d-110) then
tmp = (x * ((z - t) / 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 = ((x / y) * (z - t)) + t;
double tmp;
if (z < 2.759456554562692e-282) {
tmp = t_1;
} else if (z < 2.326994450874436e-110) {
tmp = (x * ((z - t) / y)) + t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = ((x / y) * (z - t)) + t tmp = 0 if z < 2.759456554562692e-282: tmp = t_1 elif z < 2.326994450874436e-110: tmp = (x * ((z - t) / y)) + t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(x / y) * Float64(z - t)) + t) tmp = 0.0 if (z < 2.759456554562692e-282) tmp = t_1; elseif (z < 2.326994450874436e-110) tmp = Float64(Float64(x * Float64(Float64(z - t) / y)) + t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = ((x / y) * (z - t)) + t; tmp = 0.0; if (z < 2.759456554562692e-282) tmp = t_1; elseif (z < 2.326994450874436e-110) tmp = (x * ((z - t) / y)) + t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, If[Less[z, 2.759456554562692e-282], t$95$1, If[Less[z, 2.326994450874436e-110], N[(N[(x * N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} \cdot \left(z - t\right) + t\\
\mathbf{if}\;z < 2.759456554562692 \cdot 10^{-282}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 2.326994450874436 \cdot 10^{-110}:\\
\;\;\;\;x \cdot \frac{z - t}{y} + t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024087
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
:alt
(if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))
(+ (* (/ x y) (- z t)) t))