
(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 12 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 (* (/ x y) (- z t))))
double code(double x, double y, double z, double t) {
return t + ((x / y) * (z - 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 + ((x / y) * (z - t))
end function
public static double code(double x, double y, double z, double t) {
return t + ((x / y) * (z - t));
}
def code(x, y, z, t): return t + ((x / y) * (z - t))
function code(x, y, z, t) return Float64(t + Float64(Float64(x / y) * Float64(z - t))) end
function tmp = code(x, y, z, t) tmp = t + ((x / y) * (z - t)); end
code[x_, y_, z_, t_] := N[(t + N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t + \frac{x}{y} \cdot \left(z - t\right)
\end{array}
Initial program 97.3%
Final simplification97.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (/ x y) (- t))) (t_2 (/ z (/ y x))))
(if (<= (/ x y) -2e+191)
t_2
(if (<= (/ x y) -4000000.0)
t_1
(if (<= (/ x y) 1e-60)
t
(if (or (<= (/ x y) 1e+57) (not (<= (/ x y) 1e+180))) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) * -t;
double t_2 = z / (y / x);
double tmp;
if ((x / y) <= -2e+191) {
tmp = t_2;
} else if ((x / y) <= -4000000.0) {
tmp = t_1;
} else if ((x / y) <= 1e-60) {
tmp = t;
} else if (((x / y) <= 1e+57) || !((x / y) <= 1e+180)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / y) * -t
t_2 = z / (y / x)
if ((x / y) <= (-2d+191)) then
tmp = t_2
else if ((x / y) <= (-4000000.0d0)) then
tmp = t_1
else if ((x / y) <= 1d-60) then
tmp = t
else if (((x / y) <= 1d+57) .or. (.not. ((x / y) <= 1d+180))) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) * -t;
double t_2 = z / (y / x);
double tmp;
if ((x / y) <= -2e+191) {
tmp = t_2;
} else if ((x / y) <= -4000000.0) {
tmp = t_1;
} else if ((x / y) <= 1e-60) {
tmp = t;
} else if (((x / y) <= 1e+57) || !((x / y) <= 1e+180)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) * -t t_2 = z / (y / x) tmp = 0 if (x / y) <= -2e+191: tmp = t_2 elif (x / y) <= -4000000.0: tmp = t_1 elif (x / y) <= 1e-60: tmp = t elif ((x / y) <= 1e+57) or not ((x / y) <= 1e+180): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) * Float64(-t)) t_2 = Float64(z / Float64(y / x)) tmp = 0.0 if (Float64(x / y) <= -2e+191) tmp = t_2; elseif (Float64(x / y) <= -4000000.0) tmp = t_1; elseif (Float64(x / y) <= 1e-60) tmp = t; elseif ((Float64(x / y) <= 1e+57) || !(Float64(x / y) <= 1e+180)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) * -t; t_2 = z / (y / x); tmp = 0.0; if ((x / y) <= -2e+191) tmp = t_2; elseif ((x / y) <= -4000000.0) tmp = t_1; elseif ((x / y) <= 1e-60) tmp = t; elseif (((x / y) <= 1e+57) || ~(((x / y) <= 1e+180))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] * (-t)), $MachinePrecision]}, Block[{t$95$2 = N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -2e+191], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], -4000000.0], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], 1e-60], t, If[Or[LessEqual[N[(x / y), $MachinePrecision], 1e+57], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1e+180]], $MachinePrecision]], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} \cdot \left(-t\right)\\
t_2 := \frac{z}{\frac{y}{x}}\\
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+191}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\frac{x}{y} \leq -4000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-60}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+57} \lor \neg \left(\frac{x}{y} \leq 10^{+180}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 x y) < -2.00000000000000015e191 or 9.9999999999999997e-61 < (/.f64 x y) < 1.00000000000000005e57 or 1e180 < (/.f64 x y) Initial program 94.9%
Taylor expanded in x around 0 91.9%
Taylor expanded in x around -inf 88.2%
Taylor expanded in z around inf 64.9%
*-commutative64.9%
associate-/l*71.6%
Simplified71.6%
if -2.00000000000000015e191 < (/.f64 x y) < -4e6 or 1.00000000000000005e57 < (/.f64 x y) < 1e180Initial program 99.8%
Taylor expanded in x around 0 94.5%
Taylor expanded in x around -inf 93.2%
Taylor expanded in z around 0 64.2%
associate-*r/64.2%
mul-1-neg64.2%
distribute-rgt-neg-in64.2%
associate-*r/65.9%
Simplified65.9%
if -4e6 < (/.f64 x y) < 9.9999999999999997e-61Initial program 98.2%
Taylor expanded in x around 0 75.3%
Final simplification72.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ z (/ y x))))
(if (<= (/ x y) -2e+191)
t_1
(if (<= (/ x y) -4000000.0)
(/ t (- (/ y x)))
(if (<= (/ x y) 1e-60)
t
(if (or (<= (/ x y) 1e+57) (not (<= (/ x y) 1e+180)))
t_1
(* (/ x y) (- t))))))))
double code(double x, double y, double z, double t) {
double t_1 = z / (y / x);
double tmp;
if ((x / y) <= -2e+191) {
tmp = t_1;
} else if ((x / y) <= -4000000.0) {
tmp = t / -(y / x);
} else if ((x / y) <= 1e-60) {
tmp = t;
} else if (((x / y) <= 1e+57) || !((x / y) <= 1e+180)) {
tmp = t_1;
} else {
tmp = (x / y) * -t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = z / (y / x)
if ((x / y) <= (-2d+191)) then
tmp = t_1
else if ((x / y) <= (-4000000.0d0)) then
tmp = t / -(y / x)
else if ((x / y) <= 1d-60) then
tmp = t
else if (((x / y) <= 1d+57) .or. (.not. ((x / y) <= 1d+180))) then
tmp = t_1
else
tmp = (x / y) * -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z / (y / x);
double tmp;
if ((x / y) <= -2e+191) {
tmp = t_1;
} else if ((x / y) <= -4000000.0) {
tmp = t / -(y / x);
} else if ((x / y) <= 1e-60) {
tmp = t;
} else if (((x / y) <= 1e+57) || !((x / y) <= 1e+180)) {
tmp = t_1;
} else {
tmp = (x / y) * -t;
}
return tmp;
}
def code(x, y, z, t): t_1 = z / (y / x) tmp = 0 if (x / y) <= -2e+191: tmp = t_1 elif (x / y) <= -4000000.0: tmp = t / -(y / x) elif (x / y) <= 1e-60: tmp = t elif ((x / y) <= 1e+57) or not ((x / y) <= 1e+180): tmp = t_1 else: tmp = (x / y) * -t return tmp
function code(x, y, z, t) t_1 = Float64(z / Float64(y / x)) tmp = 0.0 if (Float64(x / y) <= -2e+191) tmp = t_1; elseif (Float64(x / y) <= -4000000.0) tmp = Float64(t / Float64(-Float64(y / x))); elseif (Float64(x / y) <= 1e-60) tmp = t; elseif ((Float64(x / y) <= 1e+57) || !(Float64(x / y) <= 1e+180)) tmp = t_1; else tmp = Float64(Float64(x / y) * Float64(-t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z / (y / x); tmp = 0.0; if ((x / y) <= -2e+191) tmp = t_1; elseif ((x / y) <= -4000000.0) tmp = t / -(y / x); elseif ((x / y) <= 1e-60) tmp = t; elseif (((x / y) <= 1e+57) || ~(((x / y) <= 1e+180))) tmp = t_1; else tmp = (x / y) * -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -2e+191], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -4000000.0], N[(t / (-N[(y / x), $MachinePrecision])), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1e-60], t, If[Or[LessEqual[N[(x / y), $MachinePrecision], 1e+57], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1e+180]], $MachinePrecision]], t$95$1, N[(N[(x / y), $MachinePrecision] * (-t)), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{y}{x}}\\
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+191}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq -4000000:\\
\;\;\;\;\frac{t}{-\frac{y}{x}}\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-60}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+57} \lor \neg \left(\frac{x}{y} \leq 10^{+180}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \left(-t\right)\\
\end{array}
\end{array}
if (/.f64 x y) < -2.00000000000000015e191 or 9.9999999999999997e-61 < (/.f64 x y) < 1.00000000000000005e57 or 1e180 < (/.f64 x y) Initial program 94.9%
Taylor expanded in x around 0 91.9%
Taylor expanded in x around -inf 88.2%
Taylor expanded in z around inf 64.9%
*-commutative64.9%
associate-/l*71.6%
Simplified71.6%
if -2.00000000000000015e191 < (/.f64 x y) < -4e6Initial program 99.9%
Taylor expanded in z around 0 60.9%
mul-1-neg60.9%
unsub-neg60.9%
*-commutative60.9%
associate-*l/66.6%
cancel-sign-sub-inv66.6%
*-lft-identity66.6%
mul-1-neg66.6%
distribute-rgt-in66.6%
mul-1-neg66.6%
unsub-neg66.6%
Simplified66.6%
sub-neg66.6%
distribute-lft-in66.6%
*-commutative66.6%
*-un-lft-identity66.6%
distribute-rgt-neg-in66.6%
clear-num66.5%
div-inv66.7%
unsub-neg66.7%
associate-/r/52.5%
*-commutative52.5%
Applied egg-rr52.5%
Taylor expanded in x around inf 58.9%
mul-1-neg58.9%
associate-*l/51.7%
*-commutative51.7%
distribute-rgt-neg-out51.7%
distribute-neg-frac51.7%
Simplified51.7%
*-commutative51.7%
div-inv51.6%
associate-*l*64.5%
add-sqr-sqrt41.5%
sqrt-unprod38.6%
sqr-neg38.6%
sqrt-unprod1.2%
add-sqr-sqrt1.6%
associate-/r/1.6%
div-inv1.6%
frac-2neg1.6%
add-sqr-sqrt0.4%
sqrt-unprod20.3%
sqr-neg20.3%
sqrt-unprod22.8%
add-sqr-sqrt64.6%
distribute-neg-frac64.6%
Applied egg-rr64.6%
if -4e6 < (/.f64 x y) < 9.9999999999999997e-61Initial program 98.2%
Taylor expanded in x around 0 75.3%
if 1.00000000000000005e57 < (/.f64 x y) < 1e180Initial program 99.7%
Taylor expanded in x around 0 99.6%
Taylor expanded in x around -inf 99.6%
Taylor expanded in z around 0 72.3%
associate-*r/72.3%
mul-1-neg72.3%
distribute-rgt-neg-in72.3%
associate-*r/67.9%
Simplified67.9%
Final simplification72.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ z (/ y x))))
(if (<= (/ x y) -2e+191)
t_1
(if (<= (/ x y) -4000000.0)
(/ t (- (/ y x)))
(if (<= (/ x y) 1e-60)
t
(if (or (<= (/ x y) 1e+57) (not (<= (/ x y) 1e+180)))
t_1
(/ (- (* x t)) y)))))))
double code(double x, double y, double z, double t) {
double t_1 = z / (y / x);
double tmp;
if ((x / y) <= -2e+191) {
tmp = t_1;
} else if ((x / y) <= -4000000.0) {
tmp = t / -(y / x);
} else if ((x / y) <= 1e-60) {
tmp = t;
} else if (((x / y) <= 1e+57) || !((x / y) <= 1e+180)) {
tmp = t_1;
} else {
tmp = -(x * t) / 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) :: t_1
real(8) :: tmp
t_1 = z / (y / x)
if ((x / y) <= (-2d+191)) then
tmp = t_1
else if ((x / y) <= (-4000000.0d0)) then
tmp = t / -(y / x)
else if ((x / y) <= 1d-60) then
tmp = t
else if (((x / y) <= 1d+57) .or. (.not. ((x / y) <= 1d+180))) then
tmp = t_1
else
tmp = -(x * t) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = z / (y / x);
double tmp;
if ((x / y) <= -2e+191) {
tmp = t_1;
} else if ((x / y) <= -4000000.0) {
tmp = t / -(y / x);
} else if ((x / y) <= 1e-60) {
tmp = t;
} else if (((x / y) <= 1e+57) || !((x / y) <= 1e+180)) {
tmp = t_1;
} else {
tmp = -(x * t) / y;
}
return tmp;
}
def code(x, y, z, t): t_1 = z / (y / x) tmp = 0 if (x / y) <= -2e+191: tmp = t_1 elif (x / y) <= -4000000.0: tmp = t / -(y / x) elif (x / y) <= 1e-60: tmp = t elif ((x / y) <= 1e+57) or not ((x / y) <= 1e+180): tmp = t_1 else: tmp = -(x * t) / y return tmp
function code(x, y, z, t) t_1 = Float64(z / Float64(y / x)) tmp = 0.0 if (Float64(x / y) <= -2e+191) tmp = t_1; elseif (Float64(x / y) <= -4000000.0) tmp = Float64(t / Float64(-Float64(y / x))); elseif (Float64(x / y) <= 1e-60) tmp = t; elseif ((Float64(x / y) <= 1e+57) || !(Float64(x / y) <= 1e+180)) tmp = t_1; else tmp = Float64(Float64(-Float64(x * t)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z / (y / x); tmp = 0.0; if ((x / y) <= -2e+191) tmp = t_1; elseif ((x / y) <= -4000000.0) tmp = t / -(y / x); elseif ((x / y) <= 1e-60) tmp = t; elseif (((x / y) <= 1e+57) || ~(((x / y) <= 1e+180))) tmp = t_1; else tmp = -(x * t) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -2e+191], t$95$1, If[LessEqual[N[(x / y), $MachinePrecision], -4000000.0], N[(t / (-N[(y / x), $MachinePrecision])), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1e-60], t, If[Or[LessEqual[N[(x / y), $MachinePrecision], 1e+57], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1e+180]], $MachinePrecision]], t$95$1, N[((-N[(x * t), $MachinePrecision]) / y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{y}{x}}\\
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+191}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq -4000000:\\
\;\;\;\;\frac{t}{-\frac{y}{x}}\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-60}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+57} \lor \neg \left(\frac{x}{y} \leq 10^{+180}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-x \cdot t}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -2.00000000000000015e191 or 9.9999999999999997e-61 < (/.f64 x y) < 1.00000000000000005e57 or 1e180 < (/.f64 x y) Initial program 94.9%
Taylor expanded in x around 0 91.9%
Taylor expanded in x around -inf 88.2%
Taylor expanded in z around inf 64.9%
*-commutative64.9%
associate-/l*71.6%
Simplified71.6%
if -2.00000000000000015e191 < (/.f64 x y) < -4e6Initial program 99.9%
Taylor expanded in z around 0 60.9%
mul-1-neg60.9%
unsub-neg60.9%
*-commutative60.9%
associate-*l/66.6%
cancel-sign-sub-inv66.6%
*-lft-identity66.6%
mul-1-neg66.6%
distribute-rgt-in66.6%
mul-1-neg66.6%
unsub-neg66.6%
Simplified66.6%
sub-neg66.6%
distribute-lft-in66.6%
*-commutative66.6%
*-un-lft-identity66.6%
distribute-rgt-neg-in66.6%
clear-num66.5%
div-inv66.7%
unsub-neg66.7%
associate-/r/52.5%
*-commutative52.5%
Applied egg-rr52.5%
Taylor expanded in x around inf 58.9%
mul-1-neg58.9%
associate-*l/51.7%
*-commutative51.7%
distribute-rgt-neg-out51.7%
distribute-neg-frac51.7%
Simplified51.7%
*-commutative51.7%
div-inv51.6%
associate-*l*64.5%
add-sqr-sqrt41.5%
sqrt-unprod38.6%
sqr-neg38.6%
sqrt-unprod1.2%
add-sqr-sqrt1.6%
associate-/r/1.6%
div-inv1.6%
frac-2neg1.6%
add-sqr-sqrt0.4%
sqrt-unprod20.3%
sqr-neg20.3%
sqrt-unprod22.8%
add-sqr-sqrt64.6%
distribute-neg-frac64.6%
Applied egg-rr64.6%
if -4e6 < (/.f64 x y) < 9.9999999999999997e-61Initial program 98.2%
Taylor expanded in x around 0 75.3%
if 1.00000000000000005e57 < (/.f64 x y) < 1e180Initial program 99.7%
Taylor expanded in x around 0 99.6%
Taylor expanded in x around -inf 99.6%
Taylor expanded in z around 0 72.3%
mul-1-neg72.3%
distribute-lft-neg-out72.3%
*-commutative72.3%
Simplified72.3%
Final simplification72.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= t -3.3e-95)
t_1
(if (<= t 2.9e-139)
(* (/ x y) z)
(if (or (<= t 1.05e-64) (not (<= t 520000.0))) t_1 (/ z (/ y x)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (t <= -3.3e-95) {
tmp = t_1;
} else if (t <= 2.9e-139) {
tmp = (x / y) * z;
} else if ((t <= 1.05e-64) || !(t <= 520000.0)) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (x / y))
if (t <= (-3.3d-95)) then
tmp = t_1
else if (t <= 2.9d-139) then
tmp = (x / y) * z
else if ((t <= 1.05d-64) .or. (.not. (t <= 520000.0d0))) then
tmp = t_1
else
tmp = z / (y / x)
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 tmp;
if (t <= -3.3e-95) {
tmp = t_1;
} else if (t <= 2.9e-139) {
tmp = (x / y) * z;
} else if ((t <= 1.05e-64) || !(t <= 520000.0)) {
tmp = t_1;
} else {
tmp = z / (y / x);
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if t <= -3.3e-95: tmp = t_1 elif t <= 2.9e-139: tmp = (x / y) * z elif (t <= 1.05e-64) or not (t <= 520000.0): tmp = t_1 else: tmp = z / (y / x) return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (t <= -3.3e-95) tmp = t_1; elseif (t <= 2.9e-139) tmp = Float64(Float64(x / y) * z); elseif ((t <= 1.05e-64) || !(t <= 520000.0)) tmp = t_1; else tmp = Float64(z / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (t <= -3.3e-95) tmp = t_1; elseif (t <= 2.9e-139) tmp = (x / y) * z; elseif ((t <= 1.05e-64) || ~((t <= 520000.0))) tmp = t_1; else tmp = z / (y / x); 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]}, If[LessEqual[t, -3.3e-95], t$95$1, If[LessEqual[t, 2.9e-139], N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision], If[Or[LessEqual[t, 1.05e-64], N[Not[LessEqual[t, 520000.0]], $MachinePrecision]], t$95$1, N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-139}:\\
\;\;\;\;\frac{x}{y} \cdot z\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-64} \lor \neg \left(t \leq 520000\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{y}{x}}\\
\end{array}
\end{array}
if t < -3.3e-95 or 2.8999999999999999e-139 < t < 1.05000000000000006e-64 or 5.2e5 < t Initial program 99.3%
Taylor expanded in z around 0 78.6%
mul-1-neg78.6%
unsub-neg78.6%
*-commutative78.6%
associate-*l/83.2%
cancel-sign-sub-inv83.2%
*-lft-identity83.2%
mul-1-neg83.2%
distribute-rgt-in83.2%
mul-1-neg83.2%
unsub-neg83.2%
Simplified83.2%
if -3.3e-95 < t < 2.8999999999999999e-139Initial program 92.6%
Taylor expanded in x around 0 95.0%
Taylor expanded in x around -inf 78.8%
Taylor expanded in z around inf 73.3%
associate-/l*70.8%
associate-/r/74.5%
Applied egg-rr74.5%
if 1.05000000000000006e-64 < t < 5.2e5Initial program 99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around -inf 75.9%
Taylor expanded in z around inf 67.9%
*-commutative67.9%
associate-/l*76.0%
Simplified76.0%
Final simplification80.2%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -2000000000000.0) (not (<= (/ x y) 400000.0))) (/ (* x (- z t)) y) (+ t (* (/ x y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -2000000000000.0) || !((x / y) <= 400000.0)) {
tmp = (x * (z - t)) / y;
} else {
tmp = t + ((x / y) * z);
}
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) <= (-2000000000000.0d0)) .or. (.not. ((x / y) <= 400000.0d0))) then
tmp = (x * (z - t)) / y
else
tmp = t + ((x / y) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -2000000000000.0) || !((x / y) <= 400000.0)) {
tmp = (x * (z - t)) / y;
} else {
tmp = t + ((x / y) * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -2000000000000.0) or not ((x / y) <= 400000.0): tmp = (x * (z - t)) / y else: tmp = t + ((x / y) * z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -2000000000000.0) || !(Float64(x / y) <= 400000.0)) tmp = Float64(Float64(x * Float64(z - t)) / y); else tmp = Float64(t + Float64(Float64(x / y) * z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -2000000000000.0) || ~(((x / y) <= 400000.0))) tmp = (x * (z - t)) / y; else tmp = t + ((x / y) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -2000000000000.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 400000.0]], $MachinePrecision]], N[(N[(x * N[(z - t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(t + N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -2000000000000 \lor \neg \left(\frac{x}{y} \leq 400000\right):\\
\;\;\;\;\frac{x \cdot \left(z - t\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x}{y} \cdot z\\
\end{array}
\end{array}
if (/.f64 x y) < -2e12 or 4e5 < (/.f64 x y) Initial program 96.2%
Taylor expanded in x around 0 96.9%
Taylor expanded in x around -inf 96.8%
if -2e12 < (/.f64 x y) < 4e5Initial program 98.4%
Taylor expanded in z around inf 88.8%
associate-*l/94.6%
*-commutative94.6%
Simplified94.6%
Final simplification95.7%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -4000000.0) (not (<= (/ x y) 4e-29))) (/ (- z t) (/ y x)) (+ t (* (/ x y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -4000000.0) || !((x / y) <= 4e-29)) {
tmp = (z - t) / (y / x);
} else {
tmp = t + ((x / y) * z);
}
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) <= (-4000000.0d0)) .or. (.not. ((x / y) <= 4d-29))) then
tmp = (z - t) / (y / x)
else
tmp = t + ((x / y) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -4000000.0) || !((x / y) <= 4e-29)) {
tmp = (z - t) / (y / x);
} else {
tmp = t + ((x / y) * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -4000000.0) or not ((x / y) <= 4e-29): tmp = (z - t) / (y / x) else: tmp = t + ((x / y) * z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -4000000.0) || !(Float64(x / y) <= 4e-29)) tmp = Float64(Float64(z - t) / Float64(y / x)); else tmp = Float64(t + Float64(Float64(x / y) * z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -4000000.0) || ~(((x / y) <= 4e-29))) tmp = (z - t) / (y / x); else tmp = t + ((x / y) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -4000000.0], N[Not[LessEqual[N[(x / y), $MachinePrecision], 4e-29]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] / N[(y / x), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -4000000 \lor \neg \left(\frac{x}{y} \leq 4 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{z - t}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x}{y} \cdot z\\
\end{array}
\end{array}
if (/.f64 x y) < -4e6 or 3.99999999999999977e-29 < (/.f64 x y) Initial program 96.5%
Taylor expanded in x around 0 93.7%
Taylor expanded in x around -inf 92.8%
Taylor expanded in z around 0 86.9%
mul-1-neg86.9%
associate-*r/83.0%
distribute-lft-neg-out83.0%
associate-*l/84.3%
*-commutative84.3%
distribute-rgt-out94.6%
+-commutative94.6%
sub-neg94.6%
*-commutative94.6%
associate-*r/92.8%
associate-/l*95.1%
Simplified95.1%
if -4e6 < (/.f64 x y) < 3.99999999999999977e-29Initial program 98.3%
Taylor expanded in z around inf 93.5%
associate-*l/97.5%
*-commutative97.5%
Simplified97.5%
Final simplification96.2%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -5e-26) (not (<= (/ x y) 1e-60))) (* (/ x y) z) t))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -5e-26) || !((x / y) <= 1e-60)) {
tmp = (x / y) * z;
} 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-26)) .or. (.not. ((x / y) <= 1d-60))) then
tmp = (x / y) * z
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-26) || !((x / y) <= 1e-60)) {
tmp = (x / y) * z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -5e-26) or not ((x / y) <= 1e-60): tmp = (x / y) * z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -5e-26) || !(Float64(x / y) <= 1e-60)) tmp = Float64(Float64(x / y) * z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -5e-26) || ~(((x / y) <= 1e-60))) tmp = (x / y) * z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -5e-26], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1e-60]], $MachinePrecision]], N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision], t]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{-26} \lor \neg \left(\frac{x}{y} \leq 10^{-60}\right):\\
\;\;\;\;\frac{x}{y} \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if (/.f64 x y) < -5.00000000000000019e-26 or 9.9999999999999997e-61 < (/.f64 x y) Initial program 96.8%
Taylor expanded in x around 0 91.9%
Taylor expanded in x around -inf 87.5%
Taylor expanded in z around inf 53.4%
associate-/l*51.6%
associate-/r/58.3%
Applied egg-rr58.3%
if -5.00000000000000019e-26 < (/.f64 x y) < 9.9999999999999997e-61Initial program 98.0%
Taylor expanded in x around 0 77.9%
Final simplification66.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ x y) -5e-26) (not (<= (/ x y) 1e-60))) (/ z (/ y x)) t))
double code(double x, double y, double z, double t) {
double tmp;
if (((x / y) <= -5e-26) || !((x / y) <= 1e-60)) {
tmp = z / (y / x);
} 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-26)) .or. (.not. ((x / y) <= 1d-60))) then
tmp = z / (y / x)
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-26) || !((x / y) <= 1e-60)) {
tmp = z / (y / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x / y) <= -5e-26) or not ((x / y) <= 1e-60): tmp = z / (y / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(x / y) <= -5e-26) || !(Float64(x / y) <= 1e-60)) tmp = Float64(z / Float64(y / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x / y) <= -5e-26) || ~(((x / y) <= 1e-60))) tmp = z / (y / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x / y), $MachinePrecision], -5e-26], N[Not[LessEqual[N[(x / y), $MachinePrecision], 1e-60]], $MachinePrecision]], N[(z / N[(y / x), $MachinePrecision]), $MachinePrecision], t]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{-26} \lor \neg \left(\frac{x}{y} \leq 10^{-60}\right):\\
\;\;\;\;\frac{z}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if (/.f64 x y) < -5.00000000000000019e-26 or 9.9999999999999997e-61 < (/.f64 x y) Initial program 96.8%
Taylor expanded in x around 0 91.9%
Taylor expanded in x around -inf 87.5%
Taylor expanded in z around inf 53.4%
*-commutative53.4%
associate-/l*58.7%
Simplified58.7%
if -5.00000000000000019e-26 < (/.f64 x y) < 9.9999999999999997e-61Initial program 98.0%
Taylor expanded in x around 0 77.9%
Final simplification66.3%
(FPCore (x y z t) :precision binary64 (if (or (<= t -118000000000.0) (not (<= t 2.1e+159))) (* t (- 1.0 (/ x y))) (+ t (* (/ x y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -118000000000.0) || !(t <= 2.1e+159)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t + ((x / y) * z);
}
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 <= (-118000000000.0d0)) .or. (.not. (t <= 2.1d+159))) then
tmp = t * (1.0d0 - (x / y))
else
tmp = t + ((x / y) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -118000000000.0) || !(t <= 2.1e+159)) {
tmp = t * (1.0 - (x / y));
} else {
tmp = t + ((x / y) * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -118000000000.0) or not (t <= 2.1e+159): tmp = t * (1.0 - (x / y)) else: tmp = t + ((x / y) * z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -118000000000.0) || !(t <= 2.1e+159)) tmp = Float64(t * Float64(1.0 - Float64(x / y))); else tmp = Float64(t + Float64(Float64(x / y) * z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -118000000000.0) || ~((t <= 2.1e+159))) tmp = t * (1.0 - (x / y)); else tmp = t + ((x / y) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -118000000000.0], N[Not[LessEqual[t, 2.1e+159]], $MachinePrecision]], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -118000000000 \lor \neg \left(t \leq 2.1 \cdot 10^{+159}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x}{y} \cdot z\\
\end{array}
\end{array}
if t < -1.18e11 or 2.09999999999999989e159 < t Initial program 99.9%
Taylor expanded in z around 0 86.1%
mul-1-neg86.1%
unsub-neg86.1%
*-commutative86.1%
associate-*l/93.2%
cancel-sign-sub-inv93.2%
*-lft-identity93.2%
mul-1-neg93.2%
distribute-rgt-in93.2%
mul-1-neg93.2%
unsub-neg93.2%
Simplified93.2%
if -1.18e11 < t < 2.09999999999999989e159Initial program 95.5%
Taylor expanded in z around inf 83.1%
associate-*l/87.5%
*-commutative87.5%
Simplified87.5%
Final simplification89.8%
(FPCore (x y z t) :precision binary64 (if (or (<= x -0.0041) (not (<= x 126.0))) (* x (/ z y)) t))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -0.0041) || !(x <= 126.0)) {
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 <= (-0.0041d0)) .or. (.not. (x <= 126.0d0))) 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 <= -0.0041) || !(x <= 126.0)) {
tmp = x * (z / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -0.0041) or not (x <= 126.0): tmp = x * (z / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -0.0041) || !(x <= 126.0)) 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 <= -0.0041) || ~((x <= 126.0))) tmp = x * (z / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -0.0041], N[Not[LessEqual[x, 126.0]], $MachinePrecision]], N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision], t]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0041 \lor \neg \left(x \leq 126\right):\\
\;\;\;\;x \cdot \frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if x < -0.00410000000000000035 or 126 < x Initial program 96.4%
Taylor expanded in x around 0 85.9%
Taylor expanded in x around -inf 78.0%
Taylor expanded in z around inf 51.0%
associate-*r/56.7%
Simplified56.7%
if -0.00410000000000000035 < x < 126Initial program 98.3%
Taylor expanded in x around 0 59.7%
Final simplification58.1%
(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.3%
Taylor expanded in x around 0 35.3%
Final simplification35.3%
(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 2023308
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(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))