
(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 11 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 (if (or (<= (/ x y) -5.0) (not (<= (/ x y) 4e+28))) (* x (/ (- z t) y)) (+ t (* z (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -5.0) || !((x / y) <= 4e+28)) {
tmp = x * ((z - t) / y);
} else {
tmp = t + (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 (((x / y) <= (-5.0d0)) .or. (.not. ((x / y) <= 4d+28))) then
tmp = x * ((z - t) / y)
else
tmp = t + (z * (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -5.0) || !((x / y) <= 4e+28)) {
tmp = x * ((z - t) / y);
} else {
tmp = t + (z * (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -5.0) or not ((x / y) <= 4e+28): tmp = x * ((z - t) / y) else: tmp = t + (z * (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -5.0) || !(Float64(x / y) <= 4e+28)) tmp = Float64(x * Float64(Float64(z - t) / y)); else tmp = Float64(t + Float64(z * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -5.0) || ~(((x / y) <= 4e+28))) tmp = x * ((z - t) / y); else tmp = t + (z * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -5.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 4e+28]], $MachinePrecision]], N[(x * N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t + N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5 \lor \neg \left(\frac{x}{y} \leq 4 \cdot 10^{+28}\right):\\
\;\;\;\;x \cdot \frac{z - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t + z \cdot \frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -5 or 3.99999999999999983e28 < (/.f64 x y) Initial program 95.2%
*-commutative95.2%
clear-num95.2%
un-div-inv95.6%
Applied egg-rr95.6%
Taylor expanded in y around 0 94.5%
Taylor expanded in x around -inf 94.1%
associate-/l*98.0%
*-commutative98.0%
Applied egg-rr98.0%
if -5 < (/.f64 x y) < 3.99999999999999983e28Initial program 98.4%
Taylor expanded in z around inf 91.4%
*-commutative91.4%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification97.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ x y))) (t_2 (* x (/ t (- y)))) (t_3 (- (* t (/ x y)))))
(if (<= (/ x y) -1e+295)
t_3
(if (<= (/ x y) -1e+66)
t_1
(if (<= (/ x y) -5e+22)
t_2
(if (<= (/ x y) -5e-82)
t_1
(if (<= (/ x y) 5e-124)
t
(if (<= (/ x y) 4e-95)
t_1
(if (<= (/ x y) 2e-21)
t
(if (<= (/ x y) 1e+118)
t_1
(if (<= (/ x y) 2e+187)
t_2
(if (<= (/ x y) 5e+289) (* x (/ z y)) t_3))))))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x / y);
double t_2 = x * (t / -y);
double t_3 = -(t * (x / y));
double tmp;
if ((x / y) <= -1e+295) {
tmp = t_3;
} else if ((x / y) <= -1e+66) {
tmp = t_1;
} else if ((x / y) <= -5e+22) {
tmp = t_2;
} else if ((x / y) <= -5e-82) {
tmp = t_1;
} else if ((x / y) <= 5e-124) {
tmp = t;
} else if ((x / y) <= 4e-95) {
tmp = t_1;
} else if ((x / y) <= 2e-21) {
tmp = t;
} else if ((x / y) <= 1e+118) {
tmp = t_1;
} else if ((x / y) <= 2e+187) {
tmp = t_2;
} else if ((x / y) <= 5e+289) {
tmp = x * (z / y);
} 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 = z * (x / y)
t_2 = x * (t / -y)
t_3 = -(t * (x / y))
if ((x / y) <= (-1d+295)) then
tmp = t_3
else if ((x / y) <= (-1d+66)) then
tmp = t_1
else if ((x / y) <= (-5d+22)) then
tmp = t_2
else if ((x / y) <= (-5d-82)) then
tmp = t_1
else if ((x / y) <= 5d-124) then
tmp = t
else if ((x / y) <= 4d-95) then
tmp = t_1
else if ((x / y) <= 2d-21) then
tmp = t
else if ((x / y) <= 1d+118) then
tmp = t_1
else if ((x / y) <= 2d+187) then
tmp = t_2
else if ((x / y) <= 5d+289) then
tmp = x * (z / y)
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 = z * (x / y);
double t_2 = x * (t / -y);
double t_3 = -(t * (x / y));
double tmp;
if ((x / y) <= -1e+295) {
tmp = t_3;
} else if ((x / y) <= -1e+66) {
tmp = t_1;
} else if ((x / y) <= -5e+22) {
tmp = t_2;
} else if ((x / y) <= -5e-82) {
tmp = t_1;
} else if ((x / y) <= 5e-124) {
tmp = t;
} else if ((x / y) <= 4e-95) {
tmp = t_1;
} else if ((x / y) <= 2e-21) {
tmp = t;
} else if ((x / y) <= 1e+118) {
tmp = t_1;
} else if ((x / y) <= 2e+187) {
tmp = t_2;
} else if ((x / y) <= 5e+289) {
tmp = x * (z / y);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x / y) t_2 = x * (t / -y) t_3 = -(t * (x / y)) tmp = 0 if (x / y) <= -1e+295: tmp = t_3 elif (x / y) <= -1e+66: tmp = t_1 elif (x / y) <= -5e+22: tmp = t_2 elif (x / y) <= -5e-82: tmp = t_1 elif (x / y) <= 5e-124: tmp = t elif (x / y) <= 4e-95: tmp = t_1 elif (x / y) <= 2e-21: tmp = t elif (x / y) <= 1e+118: tmp = t_1 elif (x / y) <= 2e+187: tmp = t_2 elif (x / y) <= 5e+289: tmp = x * (z / y) else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x / y)) t_2 = Float64(x * Float64(t / Float64(-y))) t_3 = Float64(-Float64(t * Float64(x / y))) tmp = 0.0 if (Float64(x / y) <= -1e+295) tmp = t_3; elseif (Float64(x / y) <= -1e+66) tmp = t_1; elseif (Float64(x / y) <= -5e+22) tmp = t_2; elseif (Float64(x / y) <= -5e-82) tmp = t_1; elseif (Float64(x / y) <= 5e-124) tmp = t; elseif (Float64(x / y) <= 4e-95) tmp = t_1; elseif (Float64(x / y) <= 2e-21) tmp = t; elseif (Float64(x / y) <= 1e+118) tmp = t_1; elseif (Float64(x / y) <= 2e+187) tmp = t_2; elseif (Float64(x / y) <= 5e+289) tmp = Float64(x * Float64(z / y)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x / y); t_2 = x * (t / -y); t_3 = -(t * (x / y)); tmp = 0.0; if ((x / y) <= -1e+295) tmp = t_3; elseif ((x / y) <= -1e+66) tmp = t_1; elseif ((x / y) <= -5e+22) tmp = t_2; elseif ((x / y) <= -5e-82) tmp = t_1; elseif ((x / y) <= 5e-124) tmp = t; elseif ((x / y) <= 4e-95) tmp = t_1; elseif ((x / y) <= 2e-21) tmp = t; elseif ((x / y) <= 1e+118) tmp = t_1; elseif ((x / y) <= 2e+187) tmp = t_2; elseif ((x / y) <= 5e+289) tmp = x * (z / y); else tmp = t_3; 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[(x * N[(t / (-y)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = (-N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[N[(x / y), $MachinePrecision], -1e+295], t$95$3, If[LessEqual[N[(x / y), $MachinePrecision], -1e+66], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -5e+22], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], -5e-82], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 5e-124], t, If[LessEqual[N[(x / y), $MachinePrecision], 4e-95], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 2e-21], t, If[LessEqual[N[(x / y), $MachinePrecision], 1e+118], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 2e+187], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], 5e+289], N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{x}{y}\\
t_2 := x \cdot \frac{t}{-y}\\
t_3 := -t \cdot \frac{x}{y}\\
\mathbf{if}\;\frac{x}{y} \leq -1 \cdot 10^{+295}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;\frac{x}{y} \leq -1 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq -5 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq -5 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{-124}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 4 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 2 \cdot 10^{-21}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 2 \cdot 10^{+187}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+289}:\\
\;\;\;\;x \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if (/.f64 x y) < -9.9999999999999998e294 or 5.00000000000000031e289 < (/.f64 x y) Initial program 86.2%
*-commutative86.2%
clear-num86.2%
un-div-inv87.5%
Applied egg-rr87.5%
Taylor expanded in z around 0 65.0%
mul-1-neg65.0%
associate-*l/65.0%
distribute-rgt-neg-in65.0%
Simplified65.0%
+-commutative65.0%
distribute-rgt-neg-out65.0%
unsub-neg65.0%
*-commutative65.0%
Applied egg-rr65.0%
Taylor expanded in x around inf 65.0%
mul-1-neg65.0%
associate-*l/65.0%
distribute-rgt-neg-in65.0%
associate-*l/65.0%
associate-*r/71.6%
Simplified71.6%
if -9.9999999999999998e294 < (/.f64 x y) < -9.99999999999999945e65 or -4.9999999999999996e22 < (/.f64 x y) < -4.9999999999999998e-82 or 5.0000000000000003e-124 < (/.f64 x y) < 3.99999999999999996e-95 or 1.99999999999999982e-21 < (/.f64 x y) < 9.99999999999999967e117Initial program 99.8%
*-commutative99.8%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 83.7%
Taylor expanded in x around -inf 77.9%
Taylor expanded in z around inf 59.4%
associate-*l/67.6%
*-commutative67.6%
Simplified67.6%
if -9.99999999999999945e65 < (/.f64 x y) < -4.9999999999999996e22 or 9.99999999999999967e117 < (/.f64 x y) < 1.99999999999999981e187Initial program 99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 65.2%
mul-1-neg65.2%
associate-*l/76.1%
distribute-rgt-neg-in76.1%
Simplified76.1%
+-commutative76.1%
distribute-rgt-neg-out76.1%
unsub-neg76.1%
*-commutative76.1%
Applied egg-rr76.1%
Taylor expanded in x around inf 65.1%
mul-1-neg65.1%
associate-*l/76.1%
distribute-rgt-neg-in76.1%
Simplified76.1%
if -4.9999999999999998e-82 < (/.f64 x y) < 5.0000000000000003e-124 or 3.99999999999999996e-95 < (/.f64 x y) < 1.99999999999999982e-21Initial program 98.0%
Taylor expanded in x around 0 82.7%
if 1.99999999999999981e187 < (/.f64 x y) < 5.00000000000000031e289Initial program 100.0%
*-commutative100.0%
clear-num99.9%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 99.9%
Taylor expanded in x around -inf 99.9%
Taylor expanded in z around inf 87.7%
associate-*r/87.8%
Simplified87.8%
Final simplification75.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* z (/ x y))) (t_2 (- (* t (/ x y)))))
(if (<= (/ x y) -1e+295)
t_2
(if (<= (/ x y) -1e+66)
t_1
(if (<= (/ x y) -5e+22)
t_2
(if (<= (/ x y) -5e-82)
t_1
(if (<= (/ x y) 5e-124)
t
(if (<= (/ x y) 4e-95)
t_1
(if (<= (/ x y) 2e-21)
t
(if (<= (/ x y) 5e+289) t_1 t_2))))))))))
double code(double x, double y, double z, double t) {
double t_1 = z * (x / y);
double t_2 = -(t * (x / y));
double tmp;
if ((x / y) <= -1e+295) {
tmp = t_2;
} else if ((x / y) <= -1e+66) {
tmp = t_1;
} else if ((x / y) <= -5e+22) {
tmp = t_2;
} else if ((x / y) <= -5e-82) {
tmp = t_1;
} else if ((x / y) <= 5e-124) {
tmp = t;
} else if ((x / y) <= 4e-95) {
tmp = t_1;
} else if ((x / y) <= 2e-21) {
tmp = t;
} else if ((x / y) <= 5e+289) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = z * (x / y)
t_2 = -(t * (x / y))
if ((x / y) <= (-1d+295)) then
tmp = t_2
else if ((x / y) <= (-1d+66)) then
tmp = t_1
else if ((x / y) <= (-5d+22)) then
tmp = t_2
else if ((x / y) <= (-5d-82)) then
tmp = t_1
else if ((x / y) <= 5d-124) then
tmp = t
else if ((x / y) <= 4d-95) then
tmp = t_1
else if ((x / y) <= 2d-21) then
tmp = t
else if ((x / y) <= 5d+289) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z * (x / y);
double t_2 = -(t * (x / y));
double tmp;
if ((x / y) <= -1e+295) {
tmp = t_2;
} else if ((x / y) <= -1e+66) {
tmp = t_1;
} else if ((x / y) <= -5e+22) {
tmp = t_2;
} else if ((x / y) <= -5e-82) {
tmp = t_1;
} else if ((x / y) <= 5e-124) {
tmp = t;
} else if ((x / y) <= 4e-95) {
tmp = t_1;
} else if ((x / y) <= 2e-21) {
tmp = t;
} else if ((x / y) <= 5e+289) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (x / y) t_2 = -(t * (x / y)) tmp = 0 if (x / y) <= -1e+295: tmp = t_2 elif (x / y) <= -1e+66: tmp = t_1 elif (x / y) <= -5e+22: tmp = t_2 elif (x / y) <= -5e-82: tmp = t_1 elif (x / y) <= 5e-124: tmp = t elif (x / y) <= 4e-95: tmp = t_1 elif (x / y) <= 2e-21: tmp = t elif (x / y) <= 5e+289: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(x / y)) t_2 = Float64(-Float64(t * Float64(x / y))) tmp = 0.0 if (Float64(x / y) <= -1e+295) tmp = t_2; elseif (Float64(x / y) <= -1e+66) tmp = t_1; elseif (Float64(x / y) <= -5e+22) tmp = t_2; elseif (Float64(x / y) <= -5e-82) tmp = t_1; elseif (Float64(x / y) <= 5e-124) tmp = t; elseif (Float64(x / y) <= 4e-95) tmp = t_1; elseif (Float64(x / y) <= 2e-21) tmp = t; elseif (Float64(x / y) <= 5e+289) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (x / y); t_2 = -(t * (x / y)); tmp = 0.0; if ((x / y) <= -1e+295) tmp = t_2; elseif ((x / y) <= -1e+66) tmp = t_1; elseif ((x / y) <= -5e+22) tmp = t_2; elseif ((x / y) <= -5e-82) tmp = t_1; elseif ((x / y) <= 5e-124) tmp = t; elseif ((x / y) <= 4e-95) tmp = t_1; elseif ((x / y) <= 2e-21) tmp = t; elseif ((x / y) <= 5e+289) tmp = t_1; 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[(t * N[(x / y), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[N[(x / y), $MachinePrecision], -1e+295], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], -1e+66], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -5e+22], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], -5e-82], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 5e-124], t, If[LessEqual[N[(x / y), $MachinePrecision], 4e-95], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 2e-21], t, If[LessEqual[N[(x / y), $MachinePrecision], 5e+289], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{x}{y}\\
t_2 := -t \cdot \frac{x}{y}\\
\mathbf{if}\;\frac{x}{y} \leq -1 \cdot 10^{+295}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq -1 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq -5 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq -5 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{-124}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 4 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 2 \cdot 10^{-21}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{+289}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 x y) < -9.9999999999999998e294 or -9.99999999999999945e65 < (/.f64 x y) < -4.9999999999999996e22 or 5.00000000000000031e289 < (/.f64 x y) Initial program 88.7%
*-commutative88.7%
clear-num88.7%
un-div-inv89.7%
Applied egg-rr89.7%
Taylor expanded in z around 0 65.5%
mul-1-neg65.5%
associate-*l/66.0%
distribute-rgt-neg-in66.0%
Simplified66.0%
+-commutative66.0%
distribute-rgt-neg-out66.0%
unsub-neg66.0%
*-commutative66.0%
Applied egg-rr66.0%
Taylor expanded in x around inf 65.5%
mul-1-neg65.5%
associate-*l/66.0%
distribute-rgt-neg-in66.0%
associate-*l/65.5%
associate-*r/71.4%
Simplified71.4%
if -9.9999999999999998e294 < (/.f64 x y) < -9.99999999999999945e65 or -4.9999999999999996e22 < (/.f64 x y) < -4.9999999999999998e-82 or 5.0000000000000003e-124 < (/.f64 x y) < 3.99999999999999996e-95 or 1.99999999999999982e-21 < (/.f64 x y) < 5.00000000000000031e289Initial program 99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 86.8%
Taylor expanded in x around -inf 82.3%
Taylor expanded in z around inf 61.5%
associate-*l/67.8%
*-commutative67.8%
Simplified67.8%
if -4.9999999999999998e-82 < (/.f64 x y) < 5.0000000000000003e-124 or 3.99999999999999996e-95 < (/.f64 x y) < 1.99999999999999982e-21Initial program 98.0%
Taylor expanded in x around 0 82.7%
Final simplification74.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))) (t_2 (* x (/ (- z t) y))))
(if (<= (/ x y) -1e-23)
t_2
(if (<= (/ x y) 5e-124)
t_1
(if (<= (/ x y) 4e-95)
(* z (/ x y))
(if (<= (/ x y) 2e-21) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double t_2 = x * ((z - t) / y);
double tmp;
if ((x / y) <= -1e-23) {
tmp = t_2;
} else if ((x / y) <= 5e-124) {
tmp = t_1;
} else if ((x / y) <= 4e-95) {
tmp = z * (x / y);
} else if ((x / y) <= 2e-21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (1.0d0 - (x / y))
t_2 = x * ((z - t) / y)
if ((x / y) <= (-1d-23)) then
tmp = t_2
else if ((x / y) <= 5d-124) then
tmp = t_1
else if ((x / y) <= 4d-95) then
tmp = z * (x / y)
else if ((x / y) <= 2d-21) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double t_2 = x * ((z - t) / y);
double tmp;
if ((x / y) <= -1e-23) {
tmp = t_2;
} else if ((x / y) <= 5e-124) {
tmp = t_1;
} else if ((x / y) <= 4e-95) {
tmp = z * (x / y);
} else if ((x / y) <= 2e-21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) t_2 = x * ((z - t) / y) tmp = 0 if (x / y) <= -1e-23: tmp = t_2 elif (x / y) <= 5e-124: tmp = t_1 elif (x / y) <= 4e-95: tmp = z * (x / y) elif (x / y) <= 2e-21: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) t_2 = Float64(x * Float64(Float64(z - t) / y)) tmp = 0.0 if (Float64(x / y) <= -1e-23) tmp = t_2; elseif (Float64(x / y) <= 5e-124) tmp = t_1; elseif (Float64(x / y) <= 4e-95) tmp = Float64(z * Float64(x / y)); elseif (Float64(x / y) <= 2e-21) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); t_2 = x * ((z - t) / y); tmp = 0.0; if ((x / y) <= -1e-23) tmp = t_2; elseif ((x / y) <= 5e-124) tmp = t_1; elseif ((x / y) <= 4e-95) tmp = z * (x / y); elseif ((x / y) <= 2e-21) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -1e-23], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], 5e-124], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 4e-95], N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 2e-21], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
t_2 := x \cdot \frac{z - t}{y}\\
\mathbf{if}\;\frac{x}{y} \leq -1 \cdot 10^{-23}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{x}{y} \leq 4 \cdot 10^{-95}:\\
\;\;\;\;z \cdot \frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 2 \cdot 10^{-21}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 x y) < -9.9999999999999996e-24 or 1.99999999999999982e-21 < (/.f64 x y) Initial program 95.8%
*-commutative95.8%
clear-num95.7%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in y around 0 91.8%
Taylor expanded in x around -inf 91.1%
associate-/l*94.5%
*-commutative94.5%
Applied egg-rr94.5%
if -9.9999999999999996e-24 < (/.f64 x y) < 5.0000000000000003e-124 or 3.99999999999999996e-95 < (/.f64 x y) < 1.99999999999999982e-21Initial program 98.2%
Taylor expanded in z around 0 73.9%
mul-1-neg73.9%
unsub-neg73.9%
*-rgt-identity73.9%
associate-/l*77.3%
distribute-lft-out--77.3%
Simplified77.3%
if 5.0000000000000003e-124 < (/.f64 x y) < 3.99999999999999996e-95Initial program 100.0%
*-commutative100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 99.7%
Taylor expanded in x around -inf 98.8%
Taylor expanded in z around inf 98.8%
associate-*l/99.1%
*-commutative99.1%
Simplified99.1%
Final simplification87.0%
(FPCore (x y z t)
:precision binary64
(if (or (<= (/ x y) -5e-82)
(and (not (<= (/ x y) 5e-124))
(or (<= (/ x y) 4e-95) (not (<= (/ x y) 2e-21)))))
(* z (/ x y))
t))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -5e-82) || (!((x / y) <= 5e-124) && (((x / y) <= 4e-95) || !((x / y) <= 2e-21)))) {
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) <= (-5d-82)) .or. (.not. ((x / y) <= 5d-124)) .and. ((x / y) <= 4d-95) .or. (.not. ((x / y) <= 2d-21))) 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) <= -5e-82) || (!((x / y) <= 5e-124) && (((x / y) <= 4e-95) || !((x / y) <= 2e-21)))) {
tmp = z * (x / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -5e-82) or (not ((x / y) <= 5e-124) and (((x / y) <= 4e-95) or not ((x / y) <= 2e-21))): tmp = z * (x / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -5e-82) || (!(Float64(x / y) <= 5e-124) && ((Float64(x / y) <= 4e-95) || !(Float64(x / y) <= 2e-21)))) 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) <= -5e-82) || (~(((x / y) <= 5e-124)) && (((x / y) <= 4e-95) || ~(((x / y) <= 2e-21))))) tmp = z * (x / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -5e-82], And[N[Not[LessEqual[N[(x / y), $MachinePrecision], 5e-124]], $MachinePrecision], Or[LessEqual[N[(x / y), $MachinePrecision], 4e-95], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2e-21]], $MachinePrecision]]]], N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision], t]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{-82} \lor \neg \left(\frac{x}{y} \leq 5 \cdot 10^{-124}\right) \land \left(\frac{x}{y} \leq 4 \cdot 10^{-95} \lor \neg \left(\frac{x}{y} \leq 2 \cdot 10^{-21}\right)\right):\\
\;\;\;\;z \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if (/.f64 x y) < -4.9999999999999998e-82 or 5.0000000000000003e-124 < (/.f64 x y) < 3.99999999999999996e-95 or 1.99999999999999982e-21 < (/.f64 x y) Initial program 96.3%
*-commutative96.3%
clear-num96.2%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in y around 0 90.4%
Taylor expanded in x around -inf 87.4%
Taylor expanded in z around inf 54.4%
associate-*l/58.6%
*-commutative58.6%
Simplified58.6%
if -4.9999999999999998e-82 < (/.f64 x y) < 5.0000000000000003e-124 or 3.99999999999999996e-95 < (/.f64 x y) < 1.99999999999999982e-21Initial program 98.0%
Taylor expanded in x around 0 82.7%
Final simplification67.9%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -5.0) (not (<= (/ x y) 2e-21))) (* x (/ (- z t) y)) (+ t (* x (/ z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -5.0) || !((x / y) <= 2e-21)) {
tmp = x * ((z - t) / 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 (((x / y) <= (-5.0d0)) .or. (.not. ((x / y) <= 2d-21))) then
tmp = x * ((z - t) / 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 (((x / y) <= -5.0) || !((x / y) <= 2e-21)) {
tmp = x * ((z - t) / y);
} else {
tmp = t + (x * (z / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -5.0) or not ((x / y) <= 2e-21): tmp = x * ((z - t) / y) else: tmp = t + (x * (z / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -5.0) || !(Float64(x / y) <= 2e-21)) tmp = Float64(x * Float64(Float64(z - t) / 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 (((x / y) <= -5.0) || ~(((x / y) <= 2e-21))) tmp = x * ((z - t) / y); else tmp = t + (x * (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -5.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 2e-21]], $MachinePrecision]], N[(x * N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t + N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5 \lor \neg \left(\frac{x}{y} \leq 2 \cdot 10^{-21}\right):\\
\;\;\;\;x \cdot \frac{z - t}{y}\\
\mathbf{else}:\\
\;\;\;\;t + x \cdot \frac{z}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -5 or 1.99999999999999982e-21 < (/.f64 x y) Initial program 95.7%
*-commutative95.7%
clear-num95.7%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in y around 0 91.7%
Taylor expanded in x around -inf 91.0%
associate-/l*94.4%
*-commutative94.4%
Applied egg-rr94.4%
if -5 < (/.f64 x y) < 1.99999999999999982e-21Initial program 98.3%
Taylor expanded in z around inf 95.1%
associate-/l*90.4%
Simplified90.4%
Final simplification92.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -8.5e+23) (not (<= z 1.3e+149))) (* z (/ x y)) (* t (- 1.0 (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.5e+23) || !(z <= 1.3e+149)) {
tmp = z * (x / y);
} else {
tmp = t * (1.0 - (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 ((z <= (-8.5d+23)) .or. (.not. (z <= 1.3d+149))) then
tmp = z * (x / y)
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -8.5e+23) || !(z <= 1.3e+149)) {
tmp = z * (x / y);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -8.5e+23) or not (z <= 1.3e+149): tmp = z * (x / y) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -8.5e+23) || !(z <= 1.3e+149)) tmp = Float64(z * Float64(x / y)); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -8.5e+23) || ~((z <= 1.3e+149))) tmp = z * (x / y); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -8.5e+23], N[Not[LessEqual[z, 1.3e+149]], $MachinePrecision]], N[(z * N[(x / y), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+23} \lor \neg \left(z \leq 1.3 \cdot 10^{+149}\right):\\
\;\;\;\;z \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if z < -8.5000000000000001e23 or 1.29999999999999989e149 < z Initial program 97.9%
*-commutative97.9%
clear-num97.7%
un-div-inv97.8%
Applied egg-rr97.8%
Taylor expanded in y around 0 90.3%
Taylor expanded in x around -inf 72.3%
Taylor expanded in z around inf 66.6%
associate-*l/72.2%
*-commutative72.2%
Simplified72.2%
if -8.5000000000000001e23 < z < 1.29999999999999989e149Initial program 96.3%
Taylor expanded in z around 0 72.4%
mul-1-neg72.4%
unsub-neg72.4%
*-rgt-identity72.4%
associate-/l*76.7%
distribute-lft-out--76.7%
Simplified76.7%
Final simplification75.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -430000.0) (not (<= x 1.5e-162))) (* x (/ z y)) t))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -430000.0) || !(x <= 1.5e-162)) {
tmp = x * (z / 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 <= (-430000.0d0)) .or. (.not. (x <= 1.5d-162))) then
tmp = x * (z / 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 <= -430000.0) || !(x <= 1.5e-162)) {
tmp = x * (z / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -430000.0) or not (x <= 1.5e-162): tmp = x * (z / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -430000.0) || !(x <= 1.5e-162)) tmp = Float64(x * Float64(z / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -430000.0) || ~((x <= 1.5e-162))) tmp = x * (z / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -430000.0], N[Not[LessEqual[x, 1.5e-162]], $MachinePrecision]], N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision], t]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -430000 \lor \neg \left(x \leq 1.5 \cdot 10^{-162}\right):\\
\;\;\;\;x \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if x < -4.3e5 or 1.49999999999999999e-162 < x Initial program 96.4%
*-commutative96.4%
clear-num96.3%
un-div-inv96.6%
Applied egg-rr96.6%
Taylor expanded in y around 0 87.8%
Taylor expanded in x around -inf 76.2%
Taylor expanded in z around inf 46.9%
associate-*r/50.2%
Simplified50.2%
if -4.3e5 < x < 1.49999999999999999e-162Initial program 97.9%
Taylor expanded in x around 0 69.0%
Final simplification57.0%
(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 96.9%
*-commutative96.9%
clear-num96.9%
un-div-inv97.1%
Applied egg-rr97.1%
Final simplification97.1%
(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 96.9%
Final simplification96.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 96.9%
Taylor expanded in x around 0 35.8%
Final simplification35.8%
(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 2024096
(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))