
(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 15 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 (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - 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 / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
Initial program 98.0%
clear-num98.0%
un-div-inv98.1%
Applied egg-rr98.1%
Final simplification98.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a z)))))
(if (<= t -7.2e+76)
(+ x y)
(if (<= t 2.65e-45)
t_1
(if (<= t 5.8e+53)
(* y (- 1.0 (/ z t)))
(if (<= t 3.6e+84) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / z));
double tmp;
if (t <= -7.2e+76) {
tmp = x + y;
} else if (t <= 2.65e-45) {
tmp = t_1;
} else if (t <= 5.8e+53) {
tmp = y * (1.0 - (z / t));
} else if (t <= 3.6e+84) {
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 = x + (y / (a / z))
if (t <= (-7.2d+76)) then
tmp = x + y
else if (t <= 2.65d-45) then
tmp = t_1
else if (t <= 5.8d+53) then
tmp = y * (1.0d0 - (z / t))
else if (t <= 3.6d+84) 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 = x + (y / (a / z));
double tmp;
if (t <= -7.2e+76) {
tmp = x + y;
} else if (t <= 2.65e-45) {
tmp = t_1;
} else if (t <= 5.8e+53) {
tmp = y * (1.0 - (z / t));
} else if (t <= 3.6e+84) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / z)) tmp = 0 if t <= -7.2e+76: tmp = x + y elif t <= 2.65e-45: tmp = t_1 elif t <= 5.8e+53: tmp = y * (1.0 - (z / t)) elif t <= 3.6e+84: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / z))) tmp = 0.0 if (t <= -7.2e+76) tmp = Float64(x + y); elseif (t <= 2.65e-45) tmp = t_1; elseif (t <= 5.8e+53) tmp = Float64(y * Float64(1.0 - Float64(z / t))); elseif (t <= 3.6e+84) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / z)); tmp = 0.0; if (t <= -7.2e+76) tmp = x + y; elseif (t <= 2.65e-45) tmp = t_1; elseif (t <= 5.8e+53) tmp = y * (1.0 - (z / t)); elseif (t <= 3.6e+84) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e+76], N[(x + y), $MachinePrecision], If[LessEqual[t, 2.65e-45], t$95$1, If[LessEqual[t, 5.8e+53], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+84], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{+76}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+53}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -7.2000000000000006e76 or 3.5999999999999999e84 < t Initial program 100.0%
Taylor expanded in t around inf 88.3%
+-commutative88.3%
Simplified88.3%
if -7.2000000000000006e76 < t < 2.6499999999999999e-45 or 5.8000000000000004e53 < t < 3.5999999999999999e84Initial program 96.4%
clear-num96.4%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in t around 0 79.3%
if 2.6499999999999999e-45 < t < 5.8000000000000004e53Initial program 99.7%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 85.6%
mul-1-neg85.6%
unsub-neg85.6%
associate-/l*85.3%
div-sub85.3%
*-inverses85.3%
Simplified85.3%
Taylor expanded in x around 0 58.8%
mul-1-neg58.8%
sub-neg58.8%
metadata-eval58.8%
distribute-rgt-neg-in58.8%
+-commutative58.8%
distribute-neg-in58.8%
metadata-eval58.8%
sub-neg58.8%
Simplified58.8%
Final simplification81.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8e+220)
(/ z (/ t (- y)))
(if (or (<= z 1.6e+185) (and (not (<= z 9e+228)) (<= z 7e+251)))
(+ x y)
(* (/ z t) (- y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+220) {
tmp = z / (t / -y);
} else if ((z <= 1.6e+185) || (!(z <= 9e+228) && (z <= 7e+251))) {
tmp = x + y;
} else {
tmp = (z / t) * -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 (z <= (-8d+220)) then
tmp = z / (t / -y)
else if ((z <= 1.6d+185) .or. (.not. (z <= 9d+228)) .and. (z <= 7d+251)) then
tmp = x + y
else
tmp = (z / t) * -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+220) {
tmp = z / (t / -y);
} else if ((z <= 1.6e+185) || (!(z <= 9e+228) && (z <= 7e+251))) {
tmp = x + y;
} else {
tmp = (z / t) * -y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8e+220: tmp = z / (t / -y) elif (z <= 1.6e+185) or (not (z <= 9e+228) and (z <= 7e+251)): tmp = x + y else: tmp = (z / t) * -y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8e+220) tmp = Float64(z / Float64(t / Float64(-y))); elseif ((z <= 1.6e+185) || (!(z <= 9e+228) && (z <= 7e+251))) tmp = Float64(x + y); else tmp = Float64(Float64(z / t) * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8e+220) tmp = z / (t / -y); elseif ((z <= 1.6e+185) || (~((z <= 9e+228)) && (z <= 7e+251))) tmp = x + y; else tmp = (z / t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e+220], N[(z / N[(t / (-y)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1.6e+185], And[N[Not[LessEqual[z, 9e+228]], $MachinePrecision], LessEqual[z, 7e+251]]], N[(x + y), $MachinePrecision], N[(N[(z / t), $MachinePrecision] * (-y)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+220}:\\
\;\;\;\;\frac{z}{\frac{t}{-y}}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+185} \lor \neg \left(z \leq 9 \cdot 10^{+228}\right) \land z \leq 7 \cdot 10^{+251}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{t} \cdot \left(-y\right)\\
\end{array}
\end{array}
if z < -8e220Initial program 90.1%
clear-num90.1%
un-div-inv90.2%
Applied egg-rr90.2%
Taylor expanded in a around 0 79.5%
mul-1-neg79.5%
unsub-neg79.5%
associate-/l*69.7%
div-sub69.7%
*-inverses69.7%
Simplified69.7%
Taylor expanded in z around inf 64.3%
mul-1-neg64.3%
associate-*r/54.5%
distribute-lft-neg-in54.5%
*-commutative54.5%
Simplified54.5%
frac-2neg54.5%
associate-*l/64.3%
associate-*r/64.2%
frac-2neg64.2%
clear-num64.2%
un-div-inv64.1%
Applied egg-rr64.1%
if -8e220 < z < 1.60000000000000003e185 or 8.99999999999999966e228 < z < 7.00000000000000008e251Initial program 99.0%
Taylor expanded in t around inf 68.2%
+-commutative68.2%
Simplified68.2%
if 1.60000000000000003e185 < z < 8.99999999999999966e228 or 7.00000000000000008e251 < z Initial program 96.3%
clear-num96.4%
un-div-inv96.4%
Applied egg-rr96.4%
Taylor expanded in a around 0 51.5%
mul-1-neg51.5%
unsub-neg51.5%
associate-/l*58.3%
div-sub58.3%
*-inverses58.3%
Simplified58.3%
Taylor expanded in z around inf 47.8%
mul-1-neg47.8%
associate-*r/50.9%
distribute-lft-neg-in50.9%
*-commutative50.9%
Simplified50.9%
Final simplification66.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.4e+220)
(/ (* y z) (- t))
(if (or (<= z 1.65e+185) (and (not (<= z 2.2e+229)) (<= z 4.4e+253)))
(+ x y)
(* (/ z t) (- y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.4e+220) {
tmp = (y * z) / -t;
} else if ((z <= 1.65e+185) || (!(z <= 2.2e+229) && (z <= 4.4e+253))) {
tmp = x + y;
} else {
tmp = (z / t) * -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 (z <= (-4.4d+220)) then
tmp = (y * z) / -t
else if ((z <= 1.65d+185) .or. (.not. (z <= 2.2d+229)) .and. (z <= 4.4d+253)) then
tmp = x + y
else
tmp = (z / t) * -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.4e+220) {
tmp = (y * z) / -t;
} else if ((z <= 1.65e+185) || (!(z <= 2.2e+229) && (z <= 4.4e+253))) {
tmp = x + y;
} else {
tmp = (z / t) * -y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.4e+220: tmp = (y * z) / -t elif (z <= 1.65e+185) or (not (z <= 2.2e+229) and (z <= 4.4e+253)): tmp = x + y else: tmp = (z / t) * -y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.4e+220) tmp = Float64(Float64(y * z) / Float64(-t)); elseif ((z <= 1.65e+185) || (!(z <= 2.2e+229) && (z <= 4.4e+253))) tmp = Float64(x + y); else tmp = Float64(Float64(z / t) * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.4e+220) tmp = (y * z) / -t; elseif ((z <= 1.65e+185) || (~((z <= 2.2e+229)) && (z <= 4.4e+253))) tmp = x + y; else tmp = (z / t) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.4e+220], N[(N[(y * z), $MachinePrecision] / (-t)), $MachinePrecision], If[Or[LessEqual[z, 1.65e+185], And[N[Not[LessEqual[z, 2.2e+229]], $MachinePrecision], LessEqual[z, 4.4e+253]]], N[(x + y), $MachinePrecision], N[(N[(z / t), $MachinePrecision] * (-y)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+220}:\\
\;\;\;\;\frac{y \cdot z}{-t}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+185} \lor \neg \left(z \leq 2.2 \cdot 10^{+229}\right) \land z \leq 4.4 \cdot 10^{+253}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{t} \cdot \left(-y\right)\\
\end{array}
\end{array}
if z < -4.39999999999999978e220Initial program 90.1%
clear-num90.1%
un-div-inv90.2%
Applied egg-rr90.2%
Taylor expanded in a around 0 79.5%
mul-1-neg79.5%
unsub-neg79.5%
associate-/l*69.7%
div-sub69.7%
*-inverses69.7%
Simplified69.7%
Taylor expanded in z around inf 64.3%
mul-1-neg64.3%
associate-*r/54.5%
distribute-lft-neg-in54.5%
*-commutative54.5%
Simplified54.5%
frac-2neg54.5%
associate-*l/64.3%
associate-*r/64.2%
frac-2neg64.2%
associate-*r/64.3%
Applied egg-rr64.3%
if -4.39999999999999978e220 < z < 1.65000000000000006e185 or 2.20000000000000004e229 < z < 4.40000000000000011e253Initial program 99.0%
Taylor expanded in t around inf 68.2%
+-commutative68.2%
Simplified68.2%
if 1.65000000000000006e185 < z < 2.20000000000000004e229 or 4.40000000000000011e253 < z Initial program 96.3%
clear-num96.4%
un-div-inv96.4%
Applied egg-rr96.4%
Taylor expanded in a around 0 51.5%
mul-1-neg51.5%
unsub-neg51.5%
associate-/l*58.3%
div-sub58.3%
*-inverses58.3%
Simplified58.3%
Taylor expanded in z around inf 47.8%
mul-1-neg47.8%
associate-*r/50.9%
distribute-lft-neg-in50.9%
*-commutative50.9%
Simplified50.9%
Final simplification66.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9.2e+76)
(+ x y)
(if (<= t 1.45e-90)
(+ x (/ y (/ a z)))
(if (<= t 1.75e+88) (- x (* y (/ z t))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.2e+76) {
tmp = x + y;
} else if (t <= 1.45e-90) {
tmp = x + (y / (a / z));
} else if (t <= 1.75e+88) {
tmp = x - (y * (z / 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.2d+76)) then
tmp = x + y
else if (t <= 1.45d-90) then
tmp = x + (y / (a / z))
else if (t <= 1.75d+88) then
tmp = x - (y * (z / 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.2e+76) {
tmp = x + y;
} else if (t <= 1.45e-90) {
tmp = x + (y / (a / z));
} else if (t <= 1.75e+88) {
tmp = x - (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.2e+76: tmp = x + y elif t <= 1.45e-90: tmp = x + (y / (a / z)) elif t <= 1.75e+88: tmp = x - (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.2e+76) tmp = Float64(x + y); elseif (t <= 1.45e-90) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (t <= 1.75e+88) tmp = Float64(x - Float64(y * Float64(z / 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.2e+76) tmp = x + y; elseif (t <= 1.45e-90) tmp = x + (y / (a / z)); elseif (t <= 1.75e+88) tmp = x - (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.2e+76], N[(x + y), $MachinePrecision], If[LessEqual[t, 1.45e-90], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.75e+88], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{+76}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-90}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+88}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -9.20000000000000005e76 or 1.7499999999999999e88 < t Initial program 100.0%
Taylor expanded in t around inf 88.3%
+-commutative88.3%
Simplified88.3%
if -9.20000000000000005e76 < t < 1.44999999999999992e-90Initial program 95.9%
clear-num95.9%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in t around 0 80.4%
if 1.44999999999999992e-90 < t < 1.7499999999999999e88Initial program 99.8%
Taylor expanded in z around inf 86.8%
associate-/l*86.6%
Simplified86.6%
Taylor expanded in a around 0 79.3%
mul-1-neg79.3%
unsub-neg79.3%
associate-/l*79.1%
Simplified79.1%
Final simplification83.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1e+77)
(+ x y)
(if (<= t 1.22e-89)
(+ x (/ y (/ a z)))
(if (<= t 4e+87) (- x (* z (/ y t))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1e+77) {
tmp = x + y;
} else if (t <= 1.22e-89) {
tmp = x + (y / (a / z));
} else if (t <= 4e+87) {
tmp = x - (z * (y / 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 <= (-1d+77)) then
tmp = x + y
else if (t <= 1.22d-89) then
tmp = x + (y / (a / z))
else if (t <= 4d+87) then
tmp = x - (z * (y / 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 <= -1e+77) {
tmp = x + y;
} else if (t <= 1.22e-89) {
tmp = x + (y / (a / z));
} else if (t <= 4e+87) {
tmp = x - (z * (y / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1e+77: tmp = x + y elif t <= 1.22e-89: tmp = x + (y / (a / z)) elif t <= 4e+87: tmp = x - (z * (y / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1e+77) tmp = Float64(x + y); elseif (t <= 1.22e-89) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (t <= 4e+87) tmp = Float64(x - Float64(z * Float64(y / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1e+77) tmp = x + y; elseif (t <= 1.22e-89) tmp = x + (y / (a / z)); elseif (t <= 4e+87) tmp = x - (z * (y / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1e+77], N[(x + y), $MachinePrecision], If[LessEqual[t, 1.22e-89], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+87], N[(x - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+77}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-89}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+87}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -9.99999999999999983e76 or 3.9999999999999998e87 < t Initial program 100.0%
Taylor expanded in t around inf 88.3%
+-commutative88.3%
Simplified88.3%
if -9.99999999999999983e76 < t < 1.22e-89Initial program 95.9%
clear-num95.9%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in t around 0 80.4%
if 1.22e-89 < t < 3.9999999999999998e87Initial program 99.8%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in a around 0 82.3%
mul-1-neg82.3%
unsub-neg82.3%
associate-/l*82.1%
div-sub82.1%
*-inverses82.1%
Simplified82.1%
Taylor expanded in z around inf 79.3%
*-commutative79.3%
associate-*r/79.2%
Simplified79.2%
Final simplification83.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.55e+77)
(+ x y)
(if (<= t 1.25e-89)
(+ x (/ y (/ a z)))
(if (<= t 3.2e+87) (- x (/ (* y z) t)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e+77) {
tmp = x + y;
} else if (t <= 1.25e-89) {
tmp = x + (y / (a / z));
} else if (t <= 3.2e+87) {
tmp = x - ((y * z) / 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 <= (-1.55d+77)) then
tmp = x + y
else if (t <= 1.25d-89) then
tmp = x + (y / (a / z))
else if (t <= 3.2d+87) then
tmp = x - ((y * z) / 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 <= -1.55e+77) {
tmp = x + y;
} else if (t <= 1.25e-89) {
tmp = x + (y / (a / z));
} else if (t <= 3.2e+87) {
tmp = x - ((y * z) / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.55e+77: tmp = x + y elif t <= 1.25e-89: tmp = x + (y / (a / z)) elif t <= 3.2e+87: tmp = x - ((y * z) / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.55e+77) tmp = Float64(x + y); elseif (t <= 1.25e-89) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (t <= 3.2e+87) tmp = Float64(x - Float64(Float64(y * z) / t)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.55e+77) tmp = x + y; elseif (t <= 1.25e-89) tmp = x + (y / (a / z)); elseif (t <= 3.2e+87) tmp = x - ((y * z) / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.55e+77], N[(x + y), $MachinePrecision], If[LessEqual[t, 1.25e-89], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+87], N[(x - N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+77}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-89}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+87}:\\
\;\;\;\;x - \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.54999999999999999e77 or 3.2e87 < t Initial program 100.0%
Taylor expanded in t around inf 88.3%
+-commutative88.3%
Simplified88.3%
if -1.54999999999999999e77 < t < 1.24999999999999992e-89Initial program 95.9%
clear-num95.9%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in t around 0 80.4%
if 1.24999999999999992e-89 < t < 3.2e87Initial program 99.8%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in a around 0 82.3%
mul-1-neg82.3%
unsub-neg82.3%
associate-/l*82.1%
div-sub82.1%
*-inverses82.1%
Simplified82.1%
Taylor expanded in z around inf 79.3%
Final simplification83.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8e+180) (not (<= t 3.3e+89))) (+ x y) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8e+180) || !(t <= 3.3e+89)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (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) :: tmp
if ((t <= (-8d+180)) .or. (.not. (t <= 3.3d+89))) then
tmp = x + y
else
tmp = x + (y * (z / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8e+180) || !(t <= 3.3e+89)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8e+180) or not (t <= 3.3e+89): tmp = x + y else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8e+180) || !(t <= 3.3e+89)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -8e+180) || ~((t <= 3.3e+89))) tmp = x + y; else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8e+180], N[Not[LessEqual[t, 3.3e+89]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+180} \lor \neg \left(t \leq 3.3 \cdot 10^{+89}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -8.0000000000000001e180 or 3.29999999999999974e89 < t Initial program 100.0%
Taylor expanded in t around inf 90.9%
+-commutative90.9%
Simplified90.9%
if -8.0000000000000001e180 < t < 3.29999999999999974e89Initial program 97.1%
Taylor expanded in z around inf 85.6%
associate-/l*86.7%
Simplified86.7%
Final simplification88.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.8e+63) (+ x (/ y (- 1.0 (/ a t)))) (if (<= t 1.65e+88) (+ x (* y (/ z (- a t)))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e+63) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.65e+88) {
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 <= (-3.8d+63)) then
tmp = x + (y / (1.0d0 - (a / t)))
else if (t <= 1.65d+88) 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 <= -3.8e+63) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.65e+88) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.8e+63: tmp = x + (y / (1.0 - (a / t))) elif t <= 1.65e+88: tmp = x + (y * (z / (a - t))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.8e+63) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); elseif (t <= 1.65e+88) 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 <= -3.8e+63) tmp = x + (y / (1.0 - (a / t))); elseif (t <= 1.65e+88) tmp = x + (y * (z / (a - t))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e+63], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+88], 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 -3.8 \cdot 10^{+63}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+88}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -3.8000000000000001e63Initial program 100.0%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 88.4%
associate-*r/88.4%
neg-mul-188.4%
Simplified88.4%
Taylor expanded in a around 0 88.4%
mul-1-neg88.4%
unsub-neg88.4%
Simplified88.4%
if -3.8000000000000001e63 < t < 1.6500000000000002e88Initial program 96.8%
Taylor expanded in z around inf 88.9%
associate-/l*88.9%
Simplified88.9%
if 1.6500000000000002e88 < t Initial program 100.0%
Taylor expanded in t around inf 92.8%
+-commutative92.8%
Simplified92.8%
Final simplification89.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.35e+63) (+ x (/ y (- 1.0 (/ a t)))) (if (<= t 1.04e+86) (+ x (/ (* y z) (- a t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.35e+63) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.04e+86) {
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 <= (-1.35d+63)) then
tmp = x + (y / (1.0d0 - (a / t)))
else if (t <= 1.04d+86) 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 <= -1.35e+63) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.04e+86) {
tmp = x + ((y * z) / (a - t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.35e+63: tmp = x + (y / (1.0 - (a / t))) elif t <= 1.04e+86: tmp = x + ((y * z) / (a - t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.35e+63) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); elseif (t <= 1.04e+86) tmp = Float64(x + Float64(Float64(y * 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 <= -1.35e+63) tmp = x + (y / (1.0 - (a / t))); elseif (t <= 1.04e+86) tmp = x + ((y * z) / (a - t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.35e+63], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.04e+86], N[(x + N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+63}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\mathbf{elif}\;t \leq 1.04 \cdot 10^{+86}:\\
\;\;\;\;x + \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.35000000000000009e63Initial program 100.0%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 88.4%
associate-*r/88.4%
neg-mul-188.4%
Simplified88.4%
Taylor expanded in a around 0 88.4%
mul-1-neg88.4%
unsub-neg88.4%
Simplified88.4%
if -1.35000000000000009e63 < t < 1.04000000000000004e86Initial program 96.8%
Taylor expanded in z around inf 88.9%
if 1.04000000000000004e86 < t Initial program 100.0%
Taylor expanded in t around inf 92.8%
+-commutative92.8%
Simplified92.8%
Final simplification89.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8.5e+61)
(+ x (/ y (- 1.0 (/ a t))))
(if (<= t 1.15e+87)
(+ x (/ (* y z) (- a t)))
(- x (* y (+ (/ z t) -1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.5e+61) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.15e+87) {
tmp = x + ((y * z) / (a - t));
} else {
tmp = x - (y * ((z / 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) :: tmp
if (t <= (-8.5d+61)) then
tmp = x + (y / (1.0d0 - (a / t)))
else if (t <= 1.15d+87) then
tmp = x + ((y * z) / (a - t))
else
tmp = x - (y * ((z / t) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.5e+61) {
tmp = x + (y / (1.0 - (a / t)));
} else if (t <= 1.15e+87) {
tmp = x + ((y * z) / (a - t));
} else {
tmp = x - (y * ((z / t) + -1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8.5e+61: tmp = x + (y / (1.0 - (a / t))) elif t <= 1.15e+87: tmp = x + ((y * z) / (a - t)) else: tmp = x - (y * ((z / t) + -1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.5e+61) tmp = Float64(x + Float64(y / Float64(1.0 - Float64(a / t)))); elseif (t <= 1.15e+87) tmp = Float64(x + Float64(Float64(y * z) / Float64(a - t))); else tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8.5e+61) tmp = x + (y / (1.0 - (a / t))); elseif (t <= 1.15e+87) tmp = x + ((y * z) / (a - t)); else tmp = x - (y * ((z / t) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.5e+61], N[(x + N[(y / N[(1.0 - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+87], N[(x + N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+61}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+87}:\\
\;\;\;\;x + \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\end{array}
\end{array}
if t < -8.50000000000000035e61Initial program 100.0%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 88.4%
associate-*r/88.4%
neg-mul-188.4%
Simplified88.4%
Taylor expanded in a around 0 88.4%
mul-1-neg88.4%
unsub-neg88.4%
Simplified88.4%
if -8.50000000000000035e61 < t < 1.1500000000000001e87Initial program 96.8%
Taylor expanded in z around inf 88.9%
if 1.1500000000000001e87 < t Initial program 100.0%
Taylor expanded in a around 0 74.3%
mul-1-neg74.3%
unsub-neg74.3%
associate-/l*100.0%
div-sub100.0%
sub-neg100.0%
*-inverses100.0%
metadata-eval100.0%
Simplified100.0%
Final simplification91.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -8.5e+83) (not (<= y 9e+169))) (* y (- 1.0 (/ z t))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.5e+83) || !(y <= 9e+169)) {
tmp = y * (1.0 - (z / 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 ((y <= (-8.5d+83)) .or. (.not. (y <= 9d+169))) then
tmp = y * (1.0d0 - (z / 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 ((y <= -8.5e+83) || !(y <= 9e+169)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.5e+83) or not (y <= 9e+169): tmp = y * (1.0 - (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8.5e+83) || !(y <= 9e+169)) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -8.5e+83) || ~((y <= 9e+169))) tmp = y * (1.0 - (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8.5e+83], N[Not[LessEqual[y, 9e+169]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+83} \lor \neg \left(y \leq 9 \cdot 10^{+169}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < -8.4999999999999995e83 or 8.9999999999999999e169 < y Initial program 98.6%
clear-num98.6%
un-div-inv98.7%
Applied egg-rr98.7%
Taylor expanded in a around 0 39.4%
mul-1-neg39.4%
unsub-neg39.4%
associate-/l*65.8%
div-sub65.8%
*-inverses65.8%
Simplified65.8%
Taylor expanded in x around 0 60.1%
mul-1-neg60.1%
sub-neg60.1%
metadata-eval60.1%
distribute-rgt-neg-in60.1%
+-commutative60.1%
distribute-neg-in60.1%
metadata-eval60.1%
sub-neg60.1%
Simplified60.1%
if -8.4999999999999995e83 < y < 8.9999999999999999e169Initial program 97.8%
Taylor expanded in t around inf 67.0%
+-commutative67.0%
Simplified67.0%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.75e-114) (not (<= t 4.7e-160))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.75e-114) || !(t <= 4.7e-160)) {
tmp = x + y;
} else {
tmp = x;
}
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 <= (-2.75d-114)) .or. (.not. (t <= 4.7d-160))) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.75e-114) || !(t <= 4.7e-160)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.75e-114) or not (t <= 4.7e-160): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.75e-114) || !(t <= 4.7e-160)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.75e-114) || ~((t <= 4.7e-160))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.75e-114], N[Not[LessEqual[t, 4.7e-160]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.75 \cdot 10^{-114} \lor \neg \left(t \leq 4.7 \cdot 10^{-160}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -2.75000000000000005e-114 or 4.6999999999999998e-160 < t Initial program 98.9%
Taylor expanded in t around inf 68.8%
+-commutative68.8%
Simplified68.8%
if -2.75000000000000005e-114 < t < 4.6999999999999998e-160Initial program 95.7%
Taylor expanded in x around inf 46.3%
Final simplification62.8%
(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.0%
Final simplification98.0%
(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.0%
Taylor expanded in x around inf 48.0%
Final simplification48.0%
(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 2024095
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:alt
(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)))))