
(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 12 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.6%
clear-num98.6%
un-div-inv98.7%
Applied egg-rr98.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y (- a t))))))
(if (<= t -1.4e+180)
(+ x y)
(if (<= t -1.6e+90)
t_1
(if (<= t -2.1e+72)
(+ x y)
(if (<= t -9.5e-17)
(- x (/ y (/ a (- t z))))
(if (<= t 5.8e+95) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / (a - t)));
double tmp;
if (t <= -1.4e+180) {
tmp = x + y;
} else if (t <= -1.6e+90) {
tmp = t_1;
} else if (t <= -2.1e+72) {
tmp = x + y;
} else if (t <= -9.5e-17) {
tmp = x - (y / (a / (t - z)));
} else if (t <= 5.8e+95) {
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 + (z * (y / (a - t)))
if (t <= (-1.4d+180)) then
tmp = x + y
else if (t <= (-1.6d+90)) then
tmp = t_1
else if (t <= (-2.1d+72)) then
tmp = x + y
else if (t <= (-9.5d-17)) then
tmp = x - (y / (a / (t - z)))
else if (t <= 5.8d+95) 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 + (z * (y / (a - t)));
double tmp;
if (t <= -1.4e+180) {
tmp = x + y;
} else if (t <= -1.6e+90) {
tmp = t_1;
} else if (t <= -2.1e+72) {
tmp = x + y;
} else if (t <= -9.5e-17) {
tmp = x - (y / (a / (t - z)));
} else if (t <= 5.8e+95) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / (a - t))) tmp = 0 if t <= -1.4e+180: tmp = x + y elif t <= -1.6e+90: tmp = t_1 elif t <= -2.1e+72: tmp = x + y elif t <= -9.5e-17: tmp = x - (y / (a / (t - z))) elif t <= 5.8e+95: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / Float64(a - t)))) tmp = 0.0 if (t <= -1.4e+180) tmp = Float64(x + y); elseif (t <= -1.6e+90) tmp = t_1; elseif (t <= -2.1e+72) tmp = Float64(x + y); elseif (t <= -9.5e-17) tmp = Float64(x - Float64(y / Float64(a / Float64(t - z)))); elseif (t <= 5.8e+95) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / (a - t))); tmp = 0.0; if (t <= -1.4e+180) tmp = x + y; elseif (t <= -1.6e+90) tmp = t_1; elseif (t <= -2.1e+72) tmp = x + y; elseif (t <= -9.5e-17) tmp = x - (y / (a / (t - z))); elseif (t <= 5.8e+95) 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[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e+180], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.6e+90], t$95$1, If[LessEqual[t, -2.1e+72], N[(x + y), $MachinePrecision], If[LessEqual[t, -9.5e-17], N[(x - N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+95], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a - t}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{+180}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{+72}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-17}:\\
\;\;\;\;x - \frac{y}{\frac{a}{t - z}}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.40000000000000006e180 or -1.59999999999999999e90 < t < -2.1000000000000001e72 or 5.80000000000000027e95 < t Initial program 100.0%
Taylor expanded in t around inf 88.5%
+-commutative88.5%
Simplified88.5%
if -1.40000000000000006e180 < t < -1.59999999999999999e90 or -9.50000000000000029e-17 < t < 5.80000000000000027e95Initial program 97.8%
Taylor expanded in z around inf 88.3%
*-commutative88.3%
associate-/l*93.0%
Applied egg-rr93.0%
if -2.1000000000000001e72 < t < -9.50000000000000029e-17Initial program 99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around inf 82.6%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y (- a t))))))
(if (<= t -1.5e+181)
(+ x y)
(if (<= t -1.12e+91)
t_1
(if (<= t -1.75e+72)
(+ x y)
(if (<= t -0.00048)
(- x (/ (* y t) a))
(if (<= t 5e+96) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / (a - t)));
double tmp;
if (t <= -1.5e+181) {
tmp = x + y;
} else if (t <= -1.12e+91) {
tmp = t_1;
} else if (t <= -1.75e+72) {
tmp = x + y;
} else if (t <= -0.00048) {
tmp = x - ((y * t) / a);
} else if (t <= 5e+96) {
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 + (z * (y / (a - t)))
if (t <= (-1.5d+181)) then
tmp = x + y
else if (t <= (-1.12d+91)) then
tmp = t_1
else if (t <= (-1.75d+72)) then
tmp = x + y
else if (t <= (-0.00048d0)) then
tmp = x - ((y * t) / a)
else if (t <= 5d+96) 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 + (z * (y / (a - t)));
double tmp;
if (t <= -1.5e+181) {
tmp = x + y;
} else if (t <= -1.12e+91) {
tmp = t_1;
} else if (t <= -1.75e+72) {
tmp = x + y;
} else if (t <= -0.00048) {
tmp = x - ((y * t) / a);
} else if (t <= 5e+96) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / (a - t))) tmp = 0 if t <= -1.5e+181: tmp = x + y elif t <= -1.12e+91: tmp = t_1 elif t <= -1.75e+72: tmp = x + y elif t <= -0.00048: tmp = x - ((y * t) / a) elif t <= 5e+96: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / Float64(a - t)))) tmp = 0.0 if (t <= -1.5e+181) tmp = Float64(x + y); elseif (t <= -1.12e+91) tmp = t_1; elseif (t <= -1.75e+72) tmp = Float64(x + y); elseif (t <= -0.00048) tmp = Float64(x - Float64(Float64(y * t) / a)); elseif (t <= 5e+96) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / (a - t))); tmp = 0.0; if (t <= -1.5e+181) tmp = x + y; elseif (t <= -1.12e+91) tmp = t_1; elseif (t <= -1.75e+72) tmp = x + y; elseif (t <= -0.00048) tmp = x - ((y * t) / a); elseif (t <= 5e+96) 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[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e+181], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.12e+91], t$95$1, If[LessEqual[t, -1.75e+72], N[(x + y), $MachinePrecision], If[LessEqual[t, -0.00048], N[(x - N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+96], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a - t}\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{+181}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{+72}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -0.00048:\\
\;\;\;\;x - \frac{y \cdot t}{a}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.50000000000000006e181 or -1.12e91 < t < -1.75000000000000005e72 or 5.0000000000000004e96 < t Initial program 100.0%
Taylor expanded in t around inf 88.5%
+-commutative88.5%
Simplified88.5%
if -1.50000000000000006e181 < t < -1.12e91 or -4.80000000000000012e-4 < t < 5.0000000000000004e96Initial program 97.9%
Taylor expanded in z around inf 88.2%
*-commutative88.2%
associate-/l*92.1%
Applied egg-rr92.1%
if -1.75000000000000005e72 < t < -4.80000000000000012e-4Initial program 99.7%
Taylor expanded in z around 0 99.8%
mul-1-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around 0 90.4%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ t (- t z))))))
(if (<= t -1.75e+72)
t_1
(if (<= t -0.00048)
(- x (/ (* y t) a))
(if (<= t -3.6e-24)
t_1
(if (<= t 1.6e+94) (+ x (* z (/ y (- a t)))) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (t / (t - z)));
double tmp;
if (t <= -1.75e+72) {
tmp = t_1;
} else if (t <= -0.00048) {
tmp = x - ((y * t) / a);
} else if (t <= -3.6e-24) {
tmp = t_1;
} else if (t <= 1.6e+94) {
tmp = x + (z * (y / (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) :: t_1
real(8) :: tmp
t_1 = x + (y / (t / (t - z)))
if (t <= (-1.75d+72)) then
tmp = t_1
else if (t <= (-0.00048d0)) then
tmp = x - ((y * t) / a)
else if (t <= (-3.6d-24)) then
tmp = t_1
else if (t <= 1.6d+94) then
tmp = x + (z * (y / (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 t_1 = x + (y / (t / (t - z)));
double tmp;
if (t <= -1.75e+72) {
tmp = t_1;
} else if (t <= -0.00048) {
tmp = x - ((y * t) / a);
} else if (t <= -3.6e-24) {
tmp = t_1;
} else if (t <= 1.6e+94) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (t / (t - z))) tmp = 0 if t <= -1.75e+72: tmp = t_1 elif t <= -0.00048: tmp = x - ((y * t) / a) elif t <= -3.6e-24: tmp = t_1 elif t <= 1.6e+94: tmp = x + (z * (y / (a - t))) else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(t / Float64(t - z)))) tmp = 0.0 if (t <= -1.75e+72) tmp = t_1; elseif (t <= -0.00048) tmp = Float64(x - Float64(Float64(y * t) / a)); elseif (t <= -3.6e-24) tmp = t_1; elseif (t <= 1.6e+94) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (t / (t - z))); tmp = 0.0; if (t <= -1.75e+72) tmp = t_1; elseif (t <= -0.00048) tmp = x - ((y * t) / a); elseif (t <= -3.6e-24) tmp = t_1; elseif (t <= 1.6e+94) tmp = x + (z * (y / (a - t))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(t / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.75e+72], t$95$1, If[LessEqual[t, -0.00048], N[(x - N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.6e-24], t$95$1, If[LessEqual[t, 1.6e+94], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{t - z}}\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -0.00048:\\
\;\;\;\;x - \frac{y \cdot t}{a}\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+94}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.75000000000000005e72 or -4.80000000000000012e-4 < t < -3.6000000000000001e-24Initial program 99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 87.4%
neg-mul-187.4%
distribute-neg-frac87.4%
Simplified87.4%
frac-2neg87.4%
div-inv87.3%
remove-double-neg87.3%
sub-neg87.3%
distribute-neg-in87.3%
remove-double-neg87.3%
Applied egg-rr87.3%
associate-*r/87.4%
*-rgt-identity87.4%
+-commutative87.4%
unsub-neg87.4%
Simplified87.4%
if -1.75000000000000005e72 < t < -4.80000000000000012e-4Initial program 99.7%
Taylor expanded in z around 0 99.8%
mul-1-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around 0 90.4%
if -3.6000000000000001e-24 < t < 1.60000000000000007e94Initial program 97.6%
Taylor expanded in z around inf 91.4%
*-commutative91.4%
associate-/l*94.1%
Applied egg-rr94.1%
if 1.60000000000000007e94 < t Initial program 100.0%
Taylor expanded in t around inf 89.3%
+-commutative89.3%
Simplified89.3%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.5e+90)
(+ x (/ y (/ t (- t z))))
(if (or (<= t -9.2e-24) (not (<= t 2.1e+59)))
(+ x (* t (/ y (- t a))))
(+ x (* z (/ y (- a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.5e+90) {
tmp = x + (y / (t / (t - z)));
} else if ((t <= -9.2e-24) || !(t <= 2.1e+59)) {
tmp = x + (t * (y / (t - a)));
} else {
tmp = x + (z * (y / (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 <= (-1.5d+90)) then
tmp = x + (y / (t / (t - z)))
else if ((t <= (-9.2d-24)) .or. (.not. (t <= 2.1d+59))) then
tmp = x + (t * (y / (t - a)))
else
tmp = x + (z * (y / (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 <= -1.5e+90) {
tmp = x + (y / (t / (t - z)));
} else if ((t <= -9.2e-24) || !(t <= 2.1e+59)) {
tmp = x + (t * (y / (t - a)));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.5e+90: tmp = x + (y / (t / (t - z))) elif (t <= -9.2e-24) or not (t <= 2.1e+59): tmp = x + (t * (y / (t - a))) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.5e+90) tmp = Float64(x + Float64(y / Float64(t / Float64(t - z)))); elseif ((t <= -9.2e-24) || !(t <= 2.1e+59)) tmp = Float64(x + Float64(t * Float64(y / Float64(t - a)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.5e+90) tmp = x + (y / (t / (t - z))); elseif ((t <= -9.2e-24) || ~((t <= 2.1e+59))) tmp = x + (t * (y / (t - a))); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.5e+90], N[(x + N[(y / N[(t / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -9.2e-24], N[Not[LessEqual[t, 2.1e+59]], $MachinePrecision]], N[(x + N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+90}:\\
\;\;\;\;x + \frac{y}{\frac{t}{t - z}}\\
\mathbf{elif}\;t \leq -9.2 \cdot 10^{-24} \lor \neg \left(t \leq 2.1 \cdot 10^{+59}\right):\\
\;\;\;\;x + t \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -1.49999999999999989e90Initial program 99.8%
clear-num99.8%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in a around 0 87.4%
neg-mul-187.4%
distribute-neg-frac87.4%
Simplified87.4%
frac-2neg87.4%
div-inv87.3%
remove-double-neg87.3%
sub-neg87.3%
distribute-neg-in87.3%
remove-double-neg87.3%
Applied egg-rr87.3%
associate-*r/87.4%
*-rgt-identity87.4%
+-commutative87.4%
unsub-neg87.4%
Simplified87.4%
if -1.49999999999999989e90 < t < -9.2000000000000004e-24 or 2.09999999999999984e59 < t Initial program 99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 68.6%
mul-1-neg68.6%
unsub-neg68.6%
associate-/l*94.1%
Simplified94.1%
if -9.2000000000000004e-24 < t < 2.09999999999999984e59Initial program 97.5%
Taylor expanded in z around inf 91.2%
*-commutative91.2%
associate-/l*93.9%
Applied egg-rr93.9%
Final simplification92.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.75e+72)
(+ x y)
(if (<= t 2.3e-114)
(+ x (* y (/ z a)))
(if (<= t 5.3e+99) (- x (* z (/ y t))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.75e+72) {
tmp = x + y;
} else if (t <= 2.3e-114) {
tmp = x + (y * (z / a));
} else if (t <= 5.3e+99) {
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 <= (-1.75d+72)) then
tmp = x + y
else if (t <= 2.3d-114) then
tmp = x + (y * (z / a))
else if (t <= 5.3d+99) 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 <= -1.75e+72) {
tmp = x + y;
} else if (t <= 2.3e-114) {
tmp = x + (y * (z / a));
} else if (t <= 5.3e+99) {
tmp = x - (z * (y / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.75e+72: tmp = x + y elif t <= 2.3e-114: tmp = x + (y * (z / a)) elif t <= 5.3e+99: tmp = x - (z * (y / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.75e+72) tmp = Float64(x + y); elseif (t <= 2.3e-114) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 5.3e+99) 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 <= -1.75e+72) tmp = x + y; elseif (t <= 2.3e-114) tmp = x + (y * (z / a)); elseif (t <= 5.3e+99) tmp = x - (z * (y / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.75e+72], N[(x + y), $MachinePrecision], If[LessEqual[t, 2.3e-114], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.3e+99], 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.75 \cdot 10^{+72}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-114}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 5.3 \cdot 10^{+99}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.75000000000000005e72 or 5.30000000000000034e99 < t Initial program 99.9%
Taylor expanded in t around inf 83.2%
+-commutative83.2%
Simplified83.2%
if -1.75000000000000005e72 < t < 2.2999999999999999e-114Initial program 97.3%
Taylor expanded in t around 0 81.9%
+-commutative81.9%
associate-/l*84.4%
Simplified84.4%
if 2.2999999999999999e-114 < t < 5.30000000000000034e99Initial program 99.1%
Taylor expanded in a around 0 81.3%
mul-1-neg81.3%
unsub-neg81.3%
associate-/l*79.4%
div-sub79.4%
sub-neg79.4%
*-inverses79.4%
metadata-eval79.4%
Simplified79.4%
Taylor expanded in z around inf 75.2%
*-commutative75.2%
associate-/l*75.2%
Applied egg-rr75.2%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.25e-25) (not (<= t 1.1e+69))) (+ x (* y (/ t (- t a)))) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.25e-25) || !(t <= 1.1e+69)) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (z * (y / (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 <= (-2.25d-25)) .or. (.not. (t <= 1.1d+69))) then
tmp = x + (y * (t / (t - a)))
else
tmp = x + (z * (y / (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 <= -2.25e-25) || !(t <= 1.1e+69)) {
tmp = x + (y * (t / (t - a)));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.25e-25) or not (t <= 1.1e+69): tmp = x + (y * (t / (t - a))) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.25e-25) || !(t <= 1.1e+69)) tmp = Float64(x + Float64(y * Float64(t / Float64(t - a)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.25e-25) || ~((t <= 1.1e+69))) tmp = x + (y * (t / (t - a))); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.25e-25], N[Not[LessEqual[t, 1.1e+69]], $MachinePrecision]], N[(x + N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{-25} \lor \neg \left(t \leq 1.1 \cdot 10^{+69}\right):\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -2.2500000000000001e-25 or 1.1000000000000001e69 < t Initial program 99.9%
Taylor expanded in z around 0 62.6%
mul-1-neg62.6%
unsub-neg62.6%
*-commutative62.6%
associate-/l*92.6%
Simplified92.6%
if -2.2500000000000001e-25 < t < 1.1000000000000001e69Initial program 97.5%
Taylor expanded in z around inf 91.2%
*-commutative91.2%
associate-/l*93.9%
Applied egg-rr93.9%
Final simplification93.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.5e+72) (not (<= t 1.65e-78))) (+ x y) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e+72) || !(t <= 1.65e-78)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
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 <= (-6.5d+72)) .or. (.not. (t <= 1.65d-78))) then
tmp = x + y
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e+72) || !(t <= 1.65e-78)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.5e+72) or not (t <= 1.65e-78): tmp = x + y else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.5e+72) || !(t <= 1.65e-78)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.5e+72) || ~((t <= 1.65e-78))) tmp = x + y; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e+72], N[Not[LessEqual[t, 1.65e-78]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+72} \lor \neg \left(t \leq 1.65 \cdot 10^{-78}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -6.5000000000000001e72 or 1.64999999999999991e-78 < t Initial program 99.9%
Taylor expanded in t around inf 79.1%
+-commutative79.1%
Simplified79.1%
if -6.5000000000000001e72 < t < 1.64999999999999991e-78Initial program 97.2%
Taylor expanded in t around 0 79.8%
+-commutative79.8%
associate-/l*82.1%
Simplified82.1%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.75e+72) (not (<= t 1.7e-78))) (+ x y) (+ x (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.75e+72) || !(t <= 1.7e-78)) {
tmp = x + y;
} else {
tmp = x + (y / (a / 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) :: tmp
if ((t <= (-1.75d+72)) .or. (.not. (t <= 1.7d-78))) then
tmp = x + y
else
tmp = x + (y / (a / z))
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.75e+72) || !(t <= 1.7e-78)) {
tmp = x + y;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.75e+72) or not (t <= 1.7e-78): tmp = x + y else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.75e+72) || !(t <= 1.7e-78)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.75e+72) || ~((t <= 1.7e-78))) tmp = x + y; else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.75e+72], N[Not[LessEqual[t, 1.7e-78]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.75 \cdot 10^{+72} \lor \neg \left(t \leq 1.7 \cdot 10^{-78}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -1.75000000000000005e72 or 1.70000000000000006e-78 < t Initial program 99.9%
Taylor expanded in t around inf 79.1%
+-commutative79.1%
Simplified79.1%
if -1.75000000000000005e72 < t < 1.70000000000000006e-78Initial program 97.2%
clear-num97.1%
un-div-inv97.2%
Applied egg-rr97.2%
Taylor expanded in t around 0 82.1%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -9.2e+73) (not (<= t 1.56e-236))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9.2e+73) || !(t <= 1.56e-236)) {
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 <= (-9.2d+73)) .or. (.not. (t <= 1.56d-236))) 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 <= -9.2e+73) || !(t <= 1.56e-236)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -9.2e+73) or not (t <= 1.56e-236): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -9.2e+73) || !(t <= 1.56e-236)) 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 <= -9.2e+73) || ~((t <= 1.56e-236))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -9.2e+73], N[Not[LessEqual[t, 1.56e-236]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{+73} \lor \neg \left(t \leq 1.56 \cdot 10^{-236}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -9.199999999999999e73 or 1.5599999999999999e-236 < t Initial program 99.1%
Taylor expanded in t around inf 71.8%
+-commutative71.8%
Simplified71.8%
if -9.199999999999999e73 < t < 1.5599999999999999e-236Initial program 97.8%
Taylor expanded in x around inf 56.6%
Final simplification66.5%
(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.6%
(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.6%
Taylor expanded in x around inf 50.9%
(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 2024100
(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)))))