
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 98.1%
Final simplification98.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- a t))))))
(if (<= z -2.5e+42)
t_1
(if (<= z 7e-104)
(- x (* t (/ y (- a t))))
(if (or (<= z 7e-19) (not (<= z 2.85e+17))) t_1 (/ y (/ (- t a) t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (a - t)));
double tmp;
if (z <= -2.5e+42) {
tmp = t_1;
} else if (z <= 7e-104) {
tmp = x - (t * (y / (a - t)));
} else if ((z <= 7e-19) || !(z <= 2.85e+17)) {
tmp = t_1;
} else {
tmp = y / ((t - a) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / (a - t)))
if (z <= (-2.5d+42)) then
tmp = t_1
else if (z <= 7d-104) then
tmp = x - (t * (y / (a - t)))
else if ((z <= 7d-19) .or. (.not. (z <= 2.85d+17))) then
tmp = t_1
else
tmp = y / ((t - a) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (a - t)));
double tmp;
if (z <= -2.5e+42) {
tmp = t_1;
} else if (z <= 7e-104) {
tmp = x - (t * (y / (a - t)));
} else if ((z <= 7e-19) || !(z <= 2.85e+17)) {
tmp = t_1;
} else {
tmp = y / ((t - a) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (a - t))) tmp = 0 if z <= -2.5e+42: tmp = t_1 elif z <= 7e-104: tmp = x - (t * (y / (a - t))) elif (z <= 7e-19) or not (z <= 2.85e+17): tmp = t_1 else: tmp = y / ((t - a) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(a - t)))) tmp = 0.0 if (z <= -2.5e+42) tmp = t_1; elseif (z <= 7e-104) tmp = Float64(x - Float64(t * Float64(y / Float64(a - t)))); elseif ((z <= 7e-19) || !(z <= 2.85e+17)) tmp = t_1; else tmp = Float64(y / Float64(Float64(t - a) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (a - t))); tmp = 0.0; if (z <= -2.5e+42) tmp = t_1; elseif (z <= 7e-104) tmp = x - (t * (y / (a - t))); elseif ((z <= 7e-19) || ~((z <= 2.85e+17))) tmp = t_1; else tmp = y / ((t - a) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+42], t$95$1, If[LessEqual[z, 7e-104], N[(x - N[(t * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 7e-19], N[Not[LessEqual[z, 2.85e+17]], $MachinePrecision]], t$95$1, N[(y / N[(N[(t - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-104}:\\
\;\;\;\;x - t \cdot \frac{y}{a - t}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-19} \lor \neg \left(z \leq 2.85 \cdot 10^{+17}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t - a}{t}}\\
\end{array}
\end{array}
if z < -2.50000000000000003e42 or 7.00000000000000057e-104 < z < 7.00000000000000031e-19 or 2.85e17 < z Initial program 96.6%
Taylor expanded in z around inf 88.7%
if -2.50000000000000003e42 < z < 7.00000000000000057e-104Initial program 99.9%
associate-*r/86.8%
Simplified86.8%
associate-/l*99.9%
associate-/r/97.4%
Applied egg-rr97.4%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
mul-1-neg78.8%
unsub-neg78.8%
*-commutative78.8%
associate-*r/92.0%
Simplified92.0%
if 7.00000000000000031e-19 < z < 2.85e17Initial program 100.0%
+-commutative100.0%
*-commutative100.0%
associate-*l/53.4%
sub-neg53.4%
+-commutative53.4%
neg-sub053.4%
associate-+l-53.4%
sub0-neg53.4%
neg-mul-153.4%
times-frac99.2%
fma-def99.2%
sub-neg99.2%
+-commutative99.2%
neg-sub099.2%
associate-+l-99.2%
sub0-neg99.2%
neg-mul-199.2%
*-commutative99.2%
associate-/l*99.2%
metadata-eval99.2%
/-rgt-identity99.2%
Simplified99.2%
Taylor expanded in y around -inf 53.4%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 98.8%
Final simplification90.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- a t))))))
(if (<= z -2.5e+42)
t_1
(if (<= z 4e-103)
(- x (* t (/ y (- a t))))
(if (or (<= z 1.15e-21) (not (<= z 1.9e+23)))
t_1
(- x (/ y (+ (/ a t) -1.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (a - t)));
double tmp;
if (z <= -2.5e+42) {
tmp = t_1;
} else if (z <= 4e-103) {
tmp = x - (t * (y / (a - t)));
} else if ((z <= 1.15e-21) || !(z <= 1.9e+23)) {
tmp = t_1;
} else {
tmp = x - (y / ((a / t) + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / (a - t)))
if (z <= (-2.5d+42)) then
tmp = t_1
else if (z <= 4d-103) then
tmp = x - (t * (y / (a - t)))
else if ((z <= 1.15d-21) .or. (.not. (z <= 1.9d+23))) then
tmp = t_1
else
tmp = x - (y / ((a / t) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (a - t)));
double tmp;
if (z <= -2.5e+42) {
tmp = t_1;
} else if (z <= 4e-103) {
tmp = x - (t * (y / (a - t)));
} else if ((z <= 1.15e-21) || !(z <= 1.9e+23)) {
tmp = t_1;
} else {
tmp = x - (y / ((a / t) + -1.0));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (a - t))) tmp = 0 if z <= -2.5e+42: tmp = t_1 elif z <= 4e-103: tmp = x - (t * (y / (a - t))) elif (z <= 1.15e-21) or not (z <= 1.9e+23): tmp = t_1 else: tmp = x - (y / ((a / t) + -1.0)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(a - t)))) tmp = 0.0 if (z <= -2.5e+42) tmp = t_1; elseif (z <= 4e-103) tmp = Float64(x - Float64(t * Float64(y / Float64(a - t)))); elseif ((z <= 1.15e-21) || !(z <= 1.9e+23)) tmp = t_1; else tmp = Float64(x - Float64(y / Float64(Float64(a / t) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (a - t))); tmp = 0.0; if (z <= -2.5e+42) tmp = t_1; elseif (z <= 4e-103) tmp = x - (t * (y / (a - t))); elseif ((z <= 1.15e-21) || ~((z <= 1.9e+23))) tmp = t_1; else tmp = x - (y / ((a / t) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+42], t$95$1, If[LessEqual[z, 4e-103], N[(x - N[(t * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.15e-21], N[Not[LessEqual[z, 1.9e+23]], $MachinePrecision]], t$95$1, N[(x - N[(y / N[(N[(a / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-103}:\\
\;\;\;\;x - t \cdot \frac{y}{a - t}\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-21} \lor \neg \left(z \leq 1.9 \cdot 10^{+23}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{t} + -1}\\
\end{array}
\end{array}
if z < -2.50000000000000003e42 or 3.99999999999999983e-103 < z < 1.15e-21 or 1.89999999999999987e23 < z Initial program 96.5%
Taylor expanded in z around inf 89.2%
if -2.50000000000000003e42 < z < 3.99999999999999983e-103Initial program 99.9%
associate-*r/86.8%
Simplified86.8%
associate-/l*99.9%
associate-/r/97.4%
Applied egg-rr97.4%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
mul-1-neg78.8%
unsub-neg78.8%
*-commutative78.8%
associate-*r/92.0%
Simplified92.0%
if 1.15e-21 < z < 1.89999999999999987e23Initial program 100.0%
Taylor expanded in z around 0 47.1%
+-commutative47.1%
mul-1-neg47.1%
unsub-neg47.1%
associate-/l*88.3%
div-sub88.3%
*-inverses88.3%
Simplified88.3%
Final simplification90.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z (- a t))))))
(if (<= z -2.5e+42)
t_1
(if (<= z 1.85e-103)
(- x (* t (/ y (- a t))))
(if (or (<= z 2e-27) (not (<= z 1.45e+23)))
t_1
(/ y (/ (- t a) (- t z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (a - t)));
double tmp;
if (z <= -2.5e+42) {
tmp = t_1;
} else if (z <= 1.85e-103) {
tmp = x - (t * (y / (a - t)));
} else if ((z <= 2e-27) || !(z <= 1.45e+23)) {
tmp = t_1;
} else {
tmp = y / ((t - a) / (t - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / (a - t)))
if (z <= (-2.5d+42)) then
tmp = t_1
else if (z <= 1.85d-103) then
tmp = x - (t * (y / (a - t)))
else if ((z <= 2d-27) .or. (.not. (z <= 1.45d+23))) then
tmp = t_1
else
tmp = y / ((t - a) / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / (a - t)));
double tmp;
if (z <= -2.5e+42) {
tmp = t_1;
} else if (z <= 1.85e-103) {
tmp = x - (t * (y / (a - t)));
} else if ((z <= 2e-27) || !(z <= 1.45e+23)) {
tmp = t_1;
} else {
tmp = y / ((t - a) / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / (a - t))) tmp = 0 if z <= -2.5e+42: tmp = t_1 elif z <= 1.85e-103: tmp = x - (t * (y / (a - t))) elif (z <= 2e-27) or not (z <= 1.45e+23): tmp = t_1 else: tmp = y / ((t - a) / (t - z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / Float64(a - t)))) tmp = 0.0 if (z <= -2.5e+42) tmp = t_1; elseif (z <= 1.85e-103) tmp = Float64(x - Float64(t * Float64(y / Float64(a - t)))); elseif ((z <= 2e-27) || !(z <= 1.45e+23)) tmp = t_1; else tmp = Float64(y / Float64(Float64(t - a) / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / (a - t))); tmp = 0.0; if (z <= -2.5e+42) tmp = t_1; elseif (z <= 1.85e-103) tmp = x - (t * (y / (a - t))); elseif ((z <= 2e-27) || ~((z <= 1.45e+23))) tmp = t_1; else tmp = y / ((t - a) / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+42], t$95$1, If[LessEqual[z, 1.85e-103], N[(x - N[(t * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2e-27], N[Not[LessEqual[z, 1.45e+23]], $MachinePrecision]], t$95$1, N[(y / N[(N[(t - a), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-103}:\\
\;\;\;\;x - t \cdot \frac{y}{a - t}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-27} \lor \neg \left(z \leq 1.45 \cdot 10^{+23}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t - a}{t - z}}\\
\end{array}
\end{array}
if z < -2.50000000000000003e42 or 1.85e-103 < z < 2.0000000000000001e-27 or 1.45000000000000006e23 < z Initial program 96.5%
Taylor expanded in z around inf 89.1%
if -2.50000000000000003e42 < z < 1.85e-103Initial program 99.9%
associate-*r/86.8%
Simplified86.8%
associate-/l*99.9%
associate-/r/97.4%
Applied egg-rr97.4%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
mul-1-neg78.8%
unsub-neg78.8%
*-commutative78.8%
associate-*r/92.0%
Simplified92.0%
if 2.0000000000000001e-27 < z < 1.45000000000000006e23Initial program 100.0%
+-commutative100.0%
*-commutative100.0%
associate-*l/62.8%
sub-neg62.8%
+-commutative62.8%
neg-sub062.8%
associate-+l-62.8%
sub0-neg62.8%
neg-mul-162.8%
times-frac99.5%
fma-def99.5%
sub-neg99.5%
+-commutative99.5%
neg-sub099.5%
associate-+l-99.5%
sub0-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.5%
metadata-eval99.5%
/-rgt-identity99.5%
Simplified99.5%
Taylor expanded in y around -inf 53.6%
associate-/l*90.8%
Simplified90.8%
Final simplification90.4%
(FPCore (x y z t a)
:precision binary64
(if (<= x -3.7e-191)
(+ x y)
(if (or (<= x -1.9e-306) (and (not (<= x 2.7e-195)) (<= x 1.36e-68)))
(/ y (/ a z))
(+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.7e-191) {
tmp = x + y;
} else if ((x <= -1.9e-306) || (!(x <= 2.7e-195) && (x <= 1.36e-68))) {
tmp = y / (a / z);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-3.7d-191)) then
tmp = x + y
else if ((x <= (-1.9d-306)) .or. (.not. (x <= 2.7d-195)) .and. (x <= 1.36d-68)) then
tmp = y / (a / z)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.7e-191) {
tmp = x + y;
} else if ((x <= -1.9e-306) || (!(x <= 2.7e-195) && (x <= 1.36e-68))) {
tmp = y / (a / z);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -3.7e-191: tmp = x + y elif (x <= -1.9e-306) or (not (x <= 2.7e-195) and (x <= 1.36e-68)): tmp = y / (a / z) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.7e-191) tmp = Float64(x + y); elseif ((x <= -1.9e-306) || (!(x <= 2.7e-195) && (x <= 1.36e-68))) tmp = Float64(y / Float64(a / z)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -3.7e-191) tmp = x + y; elseif ((x <= -1.9e-306) || (~((x <= 2.7e-195)) && (x <= 1.36e-68))) tmp = y / (a / z); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.7e-191], N[(x + y), $MachinePrecision], If[Or[LessEqual[x, -1.9e-306], And[N[Not[LessEqual[x, 2.7e-195]], $MachinePrecision], LessEqual[x, 1.36e-68]]], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{-191}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-306} \lor \neg \left(x \leq 2.7 \cdot 10^{-195}\right) \land x \leq 1.36 \cdot 10^{-68}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if x < -3.6999999999999997e-191 or -1.9e-306 < x < 2.7e-195 or 1.36000000000000003e-68 < x Initial program 98.1%
Taylor expanded in t around inf 66.2%
if -3.6999999999999997e-191 < x < -1.9e-306 or 2.7e-195 < x < 1.36000000000000003e-68Initial program 98.2%
+-commutative98.2%
*-commutative98.2%
associate-*l/92.5%
sub-neg92.5%
+-commutative92.5%
neg-sub092.5%
associate-+l-92.5%
sub0-neg92.5%
neg-mul-192.5%
times-frac94.3%
fma-def94.3%
sub-neg94.3%
+-commutative94.3%
neg-sub094.3%
associate-+l-94.3%
sub0-neg94.3%
neg-mul-194.3%
*-commutative94.3%
associate-/l*94.3%
metadata-eval94.3%
/-rgt-identity94.3%
Simplified94.3%
Taylor expanded in y around -inf 79.8%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in t around 0 52.4%
Final simplification63.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (/ a z))))
(if (<= x -2.85e-189)
(+ x y)
(if (<= x 2.85e-289)
t_1
(if (<= x 1.25e-158)
(/ (- z) (/ t y))
(if (<= x 3.8e-66) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / z);
double tmp;
if (x <= -2.85e-189) {
tmp = x + y;
} else if (x <= 2.85e-289) {
tmp = t_1;
} else if (x <= 1.25e-158) {
tmp = -z / (t / y);
} else if (x <= 3.8e-66) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y / (a / z)
if (x <= (-2.85d-189)) then
tmp = x + y
else if (x <= 2.85d-289) then
tmp = t_1
else if (x <= 1.25d-158) then
tmp = -z / (t / y)
else if (x <= 3.8d-66) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / z);
double tmp;
if (x <= -2.85e-189) {
tmp = x + y;
} else if (x <= 2.85e-289) {
tmp = t_1;
} else if (x <= 1.25e-158) {
tmp = -z / (t / y);
} else if (x <= 3.8e-66) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a / z) tmp = 0 if x <= -2.85e-189: tmp = x + y elif x <= 2.85e-289: tmp = t_1 elif x <= 1.25e-158: tmp = -z / (t / y) elif x <= 3.8e-66: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a / z)) tmp = 0.0 if (x <= -2.85e-189) tmp = Float64(x + y); elseif (x <= 2.85e-289) tmp = t_1; elseif (x <= 1.25e-158) tmp = Float64(Float64(-z) / Float64(t / y)); elseif (x <= 3.8e-66) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a / z); tmp = 0.0; if (x <= -2.85e-189) tmp = x + y; elseif (x <= 2.85e-289) tmp = t_1; elseif (x <= 1.25e-158) tmp = -z / (t / y); elseif (x <= 3.8e-66) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.85e-189], N[(x + y), $MachinePrecision], If[LessEqual[x, 2.85e-289], t$95$1, If[LessEqual[x, 1.25e-158], N[((-z) / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e-66], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;x \leq -2.85 \cdot 10^{-189}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;x \leq 2.85 \cdot 10^{-289}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-158}:\\
\;\;\;\;\frac{-z}{\frac{t}{y}}\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-66}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if x < -2.85e-189 or 3.7999999999999998e-66 < x Initial program 97.9%
Taylor expanded in t around inf 68.9%
if -2.85e-189 < x < 2.84999999999999995e-289 or 1.24999999999999993e-158 < x < 3.7999999999999998e-66Initial program 98.0%
+-commutative98.0%
*-commutative98.0%
associate-*l/94.0%
sub-neg94.0%
+-commutative94.0%
neg-sub094.0%
associate-+l-94.0%
sub0-neg94.0%
neg-mul-194.0%
times-frac89.2%
fma-def89.2%
sub-neg89.2%
+-commutative89.2%
neg-sub089.2%
associate-+l-89.2%
sub0-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.2%
metadata-eval89.2%
/-rgt-identity89.2%
Simplified89.2%
Taylor expanded in y around -inf 79.4%
associate-/l*83.2%
Simplified83.2%
Taylor expanded in t around 0 53.9%
if 2.84999999999999995e-289 < x < 1.24999999999999993e-158Initial program 99.8%
Taylor expanded in a around 0 73.5%
+-commutative73.5%
mul-1-neg73.5%
unsub-neg73.5%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in z around inf 44.6%
mul-1-neg44.6%
*-commutative44.6%
associate-*r/50.6%
distribute-rgt-neg-in50.6%
distribute-neg-frac50.6%
Simplified50.6%
*-commutative50.6%
associate-*l/44.6%
distribute-lft-neg-in44.6%
distribute-neg-frac44.6%
*-commutative44.6%
associate-/l*50.5%
Applied egg-rr50.5%
Final simplification64.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (/ a z))))
(if (<= x -8.8e-190)
(+ x y)
(if (<= x 3.95e-289)
t_1
(if (<= x 1.66e-158)
(* (- z) (/ y t))
(if (<= x 6.8e-69) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / z);
double tmp;
if (x <= -8.8e-190) {
tmp = x + y;
} else if (x <= 3.95e-289) {
tmp = t_1;
} else if (x <= 1.66e-158) {
tmp = -z * (y / t);
} else if (x <= 6.8e-69) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y / (a / z)
if (x <= (-8.8d-190)) then
tmp = x + y
else if (x <= 3.95d-289) then
tmp = t_1
else if (x <= 1.66d-158) then
tmp = -z * (y / t)
else if (x <= 6.8d-69) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / z);
double tmp;
if (x <= -8.8e-190) {
tmp = x + y;
} else if (x <= 3.95e-289) {
tmp = t_1;
} else if (x <= 1.66e-158) {
tmp = -z * (y / t);
} else if (x <= 6.8e-69) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a / z) tmp = 0 if x <= -8.8e-190: tmp = x + y elif x <= 3.95e-289: tmp = t_1 elif x <= 1.66e-158: tmp = -z * (y / t) elif x <= 6.8e-69: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a / z)) tmp = 0.0 if (x <= -8.8e-190) tmp = Float64(x + y); elseif (x <= 3.95e-289) tmp = t_1; elseif (x <= 1.66e-158) tmp = Float64(Float64(-z) * Float64(y / t)); elseif (x <= 6.8e-69) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a / z); tmp = 0.0; if (x <= -8.8e-190) tmp = x + y; elseif (x <= 3.95e-289) tmp = t_1; elseif (x <= 1.66e-158) tmp = -z * (y / t); elseif (x <= 6.8e-69) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.8e-190], N[(x + y), $MachinePrecision], If[LessEqual[x, 3.95e-289], t$95$1, If[LessEqual[x, 1.66e-158], N[((-z) * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e-69], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;x \leq -8.8 \cdot 10^{-190}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;x \leq 3.95 \cdot 10^{-289}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.66 \cdot 10^{-158}:\\
\;\;\;\;\left(-z\right) \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if x < -8.80000000000000017e-190 or 6.80000000000000016e-69 < x Initial program 97.9%
Taylor expanded in t around inf 68.9%
if -8.80000000000000017e-190 < x < 3.9499999999999999e-289 or 1.66000000000000009e-158 < x < 6.80000000000000016e-69Initial program 98.0%
+-commutative98.0%
*-commutative98.0%
associate-*l/94.0%
sub-neg94.0%
+-commutative94.0%
neg-sub094.0%
associate-+l-94.0%
sub0-neg94.0%
neg-mul-194.0%
times-frac89.2%
fma-def89.2%
sub-neg89.2%
+-commutative89.2%
neg-sub089.2%
associate-+l-89.2%
sub0-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.2%
metadata-eval89.2%
/-rgt-identity89.2%
Simplified89.2%
Taylor expanded in y around -inf 79.4%
associate-/l*83.2%
Simplified83.2%
Taylor expanded in t around 0 53.9%
if 3.9499999999999999e-289 < x < 1.66000000000000009e-158Initial program 99.8%
Taylor expanded in a around 0 73.5%
+-commutative73.5%
mul-1-neg73.5%
unsub-neg73.5%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in z around inf 44.6%
mul-1-neg44.6%
*-commutative44.6%
associate-*r/50.6%
distribute-rgt-neg-in50.6%
distribute-neg-frac50.6%
Simplified50.6%
Final simplification64.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (/ a z))))
(if (<= x -4.2e-190)
(+ x y)
(if (<= x 3.3e-289)
t_1
(if (<= x 7.8e-156)
(/ y (/ (- t) z))
(if (<= x 1.14e-67) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / z);
double tmp;
if (x <= -4.2e-190) {
tmp = x + y;
} else if (x <= 3.3e-289) {
tmp = t_1;
} else if (x <= 7.8e-156) {
tmp = y / (-t / z);
} else if (x <= 1.14e-67) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y / (a / z)
if (x <= (-4.2d-190)) then
tmp = x + y
else if (x <= 3.3d-289) then
tmp = t_1
else if (x <= 7.8d-156) then
tmp = y / (-t / z)
else if (x <= 1.14d-67) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / z);
double tmp;
if (x <= -4.2e-190) {
tmp = x + y;
} else if (x <= 3.3e-289) {
tmp = t_1;
} else if (x <= 7.8e-156) {
tmp = y / (-t / z);
} else if (x <= 1.14e-67) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a / z) tmp = 0 if x <= -4.2e-190: tmp = x + y elif x <= 3.3e-289: tmp = t_1 elif x <= 7.8e-156: tmp = y / (-t / z) elif x <= 1.14e-67: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a / z)) tmp = 0.0 if (x <= -4.2e-190) tmp = Float64(x + y); elseif (x <= 3.3e-289) tmp = t_1; elseif (x <= 7.8e-156) tmp = Float64(y / Float64(Float64(-t) / z)); elseif (x <= 1.14e-67) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a / z); tmp = 0.0; if (x <= -4.2e-190) tmp = x + y; elseif (x <= 3.3e-289) tmp = t_1; elseif (x <= 7.8e-156) tmp = y / (-t / z); elseif (x <= 1.14e-67) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.2e-190], N[(x + y), $MachinePrecision], If[LessEqual[x, 3.3e-289], t$95$1, If[LessEqual[x, 7.8e-156], N[(y / N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.14e-67], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;x \leq -4.2 \cdot 10^{-190}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-289}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-156}:\\
\;\;\;\;\frac{y}{\frac{-t}{z}}\\
\mathbf{elif}\;x \leq 1.14 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if x < -4.19999999999999983e-190 or 1.14e-67 < x Initial program 97.9%
Taylor expanded in t around inf 68.9%
if -4.19999999999999983e-190 < x < 3.29999999999999997e-289 or 7.8000000000000002e-156 < x < 1.14e-67Initial program 98.0%
+-commutative98.0%
*-commutative98.0%
associate-*l/94.0%
sub-neg94.0%
+-commutative94.0%
neg-sub094.0%
associate-+l-94.0%
sub0-neg94.0%
neg-mul-194.0%
times-frac89.2%
fma-def89.2%
sub-neg89.2%
+-commutative89.2%
neg-sub089.2%
associate-+l-89.2%
sub0-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.2%
metadata-eval89.2%
/-rgt-identity89.2%
Simplified89.2%
Taylor expanded in y around -inf 79.4%
associate-/l*83.2%
Simplified83.2%
Taylor expanded in t around 0 53.9%
if 3.29999999999999997e-289 < x < 7.8000000000000002e-156Initial program 99.8%
Taylor expanded in a around 0 73.5%
+-commutative73.5%
mul-1-neg73.5%
unsub-neg73.5%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in z around inf 44.6%
mul-1-neg44.6%
*-commutative44.6%
associate-*r/50.6%
distribute-rgt-neg-in50.6%
distribute-neg-frac50.6%
Simplified50.6%
clear-num50.6%
un-div-inv50.5%
add-sqr-sqrt29.6%
sqrt-unprod28.6%
sqr-neg28.6%
sqrt-unprod1.1%
add-sqr-sqrt2.4%
associate-/l*2.5%
*-commutative2.5%
associate-/l*2.5%
frac-2neg2.5%
add-sqr-sqrt1.4%
sqrt-unprod18.4%
sqr-neg18.4%
sqrt-unprod20.8%
add-sqr-sqrt50.6%
Applied egg-rr50.6%
Final simplification64.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (/ a z))))
(if (<= x -2.3e-191)
(+ x y)
(if (<= x -9.5e-303)
t_1
(if (<= x 9.5e-154)
(* y (- 1.0 (/ z t)))
(if (<= x 6.8e-69) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / z);
double tmp;
if (x <= -2.3e-191) {
tmp = x + y;
} else if (x <= -9.5e-303) {
tmp = t_1;
} else if (x <= 9.5e-154) {
tmp = y * (1.0 - (z / t));
} else if (x <= 6.8e-69) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y / (a / z)
if (x <= (-2.3d-191)) then
tmp = x + y
else if (x <= (-9.5d-303)) then
tmp = t_1
else if (x <= 9.5d-154) then
tmp = y * (1.0d0 - (z / t))
else if (x <= 6.8d-69) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / z);
double tmp;
if (x <= -2.3e-191) {
tmp = x + y;
} else if (x <= -9.5e-303) {
tmp = t_1;
} else if (x <= 9.5e-154) {
tmp = y * (1.0 - (z / t));
} else if (x <= 6.8e-69) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a / z) tmp = 0 if x <= -2.3e-191: tmp = x + y elif x <= -9.5e-303: tmp = t_1 elif x <= 9.5e-154: tmp = y * (1.0 - (z / t)) elif x <= 6.8e-69: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a / z)) tmp = 0.0 if (x <= -2.3e-191) tmp = Float64(x + y); elseif (x <= -9.5e-303) tmp = t_1; elseif (x <= 9.5e-154) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (x <= 6.8e-69) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a / z); tmp = 0.0; if (x <= -2.3e-191) tmp = x + y; elseif (x <= -9.5e-303) tmp = t_1; elseif (x <= 9.5e-154) tmp = y * (1.0 - (z / t)); elseif (x <= 6.8e-69) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.3e-191], N[(x + y), $MachinePrecision], If[LessEqual[x, -9.5e-303], t$95$1, If[LessEqual[x, 9.5e-154], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e-69], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{-191}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-303}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-154}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if x < -2.30000000000000011e-191 or 6.80000000000000016e-69 < x Initial program 97.9%
Taylor expanded in t around inf 68.9%
if -2.30000000000000011e-191 < x < -9.4999999999999999e-303 or 9.50000000000000057e-154 < x < 6.80000000000000016e-69Initial program 97.8%
+-commutative97.8%
*-commutative97.8%
associate-*l/95.4%
sub-neg95.4%
+-commutative95.4%
neg-sub095.4%
associate-+l-95.4%
sub0-neg95.4%
neg-mul-195.4%
times-frac93.1%
fma-def93.1%
sub-neg93.1%
+-commutative93.1%
neg-sub093.1%
associate-+l-93.1%
sub0-neg93.1%
neg-mul-193.1%
*-commutative93.1%
associate-/l*93.1%
metadata-eval93.1%
/-rgt-identity93.1%
Simplified93.1%
Taylor expanded in y around -inf 80.1%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in t around 0 56.1%
if -9.4999999999999999e-303 < x < 9.50000000000000057e-154Initial program 99.8%
Taylor expanded in a around 0 69.4%
+-commutative69.4%
mul-1-neg69.4%
unsub-neg69.4%
associate-/l*71.5%
Simplified71.5%
Taylor expanded in y around inf 69.6%
Final simplification66.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -9.5e+123) (+ x y) (if (<= t 7.4e+148) (+ x (* y (/ z (- a t)))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.5e+123) {
tmp = x + y;
} else if (t <= 7.4e+148) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-9.5d+123)) then
tmp = x + y
else if (t <= 7.4d+148) then
tmp = x + (y * (z / (a - t)))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.5e+123) {
tmp = x + y;
} else if (t <= 7.4e+148) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.5e+123: tmp = x + y elif t <= 7.4e+148: tmp = x + (y * (z / (a - t))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.5e+123) tmp = Float64(x + y); elseif (t <= 7.4e+148) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.5e+123) tmp = x + y; elseif (t <= 7.4e+148) tmp = x + (y * (z / (a - t))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.5e+123], N[(x + y), $MachinePrecision], If[LessEqual[t, 7.4e+148], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+123}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{+148}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -9.4999999999999996e123 or 7.4000000000000005e148 < t Initial program 100.0%
Taylor expanded in t around inf 88.6%
if -9.4999999999999996e123 < t < 7.4000000000000005e148Initial program 97.6%
Taylor expanded in z around inf 83.4%
Final simplification84.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.5e+119) (+ x y) (if (<= t 2.15e+79) (+ x (* y (/ z a))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.5e+119) {
tmp = x + y;
} else if (t <= 2.15e+79) {
tmp = x + (y * (z / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-5.5d+119)) then
tmp = x + y
else if (t <= 2.15d+79) then
tmp = x + (y * (z / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.5e+119) {
tmp = x + y;
} else if (t <= 2.15e+79) {
tmp = x + (y * (z / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.5e+119: tmp = x + y elif t <= 2.15e+79: tmp = x + (y * (z / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.5e+119) tmp = Float64(x + y); elseif (t <= 2.15e+79) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.5e+119) tmp = x + y; elseif (t <= 2.15e+79) tmp = x + (y * (z / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.5e+119], N[(x + y), $MachinePrecision], If[LessEqual[t, 2.15e+79], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+119}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{+79}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -5.5000000000000003e119 or 2.1500000000000002e79 < t Initial program 100.0%
Taylor expanded in t around inf 84.4%
if -5.5000000000000003e119 < t < 2.1500000000000002e79Initial program 97.3%
Taylor expanded in t around 0 69.1%
Final simplification73.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.04e+144) x (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.04e+144) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.04d+144)) then
tmp = x
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.04e+144) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.04e+144: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.04e+144) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.04e+144) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.04e+144], x, N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.04 \cdot 10^{+144}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.04e144Initial program 99.9%
Taylor expanded in x around inf 70.5%
if -1.04e144 < a Initial program 97.8%
Taylor expanded in t around inf 56.1%
Final simplification57.9%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 98.1%
Taylor expanded in x around inf 46.7%
Final simplification46.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (< y -8.508084860551241e-17)
t_1
(if (< y 2.894426862792089e-49)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * ((z - t) / (a - t)))
if (y < (-8.508084860551241d-17)) then
tmp = t_1
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) * (1.0d0 / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y < -8.508084860551241e-17: tmp = t_1 elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) * (1.0 / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) * (1.0 / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023195
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))