
(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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{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 83.8%
associate-/l*98.0%
Simplified98.0%
clear-num98.0%
un-div-inv98.2%
Applied egg-rr98.2%
Final simplification98.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.9e+119)
(+ x y)
(if (<= t -2.25e-222)
(+ x (* z (/ y (- a t))))
(if (<= t 2.75e-55)
(+ x (* y (/ (- z t) a)))
(if (<= t 1.12e+122) (+ x (* y (/ z (- a t)))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.9e+119) {
tmp = x + y;
} else if (t <= -2.25e-222) {
tmp = x + (z * (y / (a - t)));
} else if (t <= 2.75e-55) {
tmp = x + (y * ((z - t) / a));
} else if (t <= 1.12e+122) {
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 <= (-5.9d+119)) then
tmp = x + y
else if (t <= (-2.25d-222)) then
tmp = x + (z * (y / (a - t)))
else if (t <= 2.75d-55) then
tmp = x + (y * ((z - t) / a))
else if (t <= 1.12d+122) 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 <= -5.9e+119) {
tmp = x + y;
} else if (t <= -2.25e-222) {
tmp = x + (z * (y / (a - t)));
} else if (t <= 2.75e-55) {
tmp = x + (y * ((z - t) / a));
} else if (t <= 1.12e+122) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.9e+119: tmp = x + y elif t <= -2.25e-222: tmp = x + (z * (y / (a - t))) elif t <= 2.75e-55: tmp = x + (y * ((z - t) / a)) elif t <= 1.12e+122: tmp = x + (y * (z / (a - t))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.9e+119) tmp = Float64(x + y); elseif (t <= -2.25e-222) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); elseif (t <= 2.75e-55) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); elseif (t <= 1.12e+122) 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 <= -5.9e+119) tmp = x + y; elseif (t <= -2.25e-222) tmp = x + (z * (y / (a - t))); elseif (t <= 2.75e-55) tmp = x + (y * ((z - t) / a)); elseif (t <= 1.12e+122) tmp = x + (y * (z / (a - t))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.9e+119], N[(x + y), $MachinePrecision], If[LessEqual[t, -2.25e-222], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.75e-55], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.12e+122], 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 -5.9 \cdot 10^{+119}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -2.25 \cdot 10^{-222}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{-55}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{+122}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -5.9000000000000001e119 or 1.12000000000000002e122 < t Initial program 68.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 86.9%
if -5.9000000000000001e119 < t < -2.25000000000000007e-222Initial program 92.7%
associate-/l*95.5%
Simplified95.5%
clear-num95.5%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in z around inf 87.5%
associate-/r/89.8%
Applied egg-rr89.8%
if -2.25000000000000007e-222 < t < 2.7499999999999999e-55Initial program 92.5%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in a around inf 86.6%
associate-/l*92.5%
Simplified92.5%
if 2.7499999999999999e-55 < t < 1.12000000000000002e122Initial program 87.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.1%
associate-/l*88.7%
Simplified88.7%
Final simplification89.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y (- a t))))) (t_2 (- x (* y (+ (/ z t) -1.0)))))
(if (<= t -1.55e+115)
t_2
(if (<= t -2.8e-226)
t_1
(if (<= t 2.5e-30)
(+ x (* y (/ (- z t) a)))
(if (<= t 2.3e+54) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / (a - t)));
double t_2 = x - (y * ((z / t) + -1.0));
double tmp;
if (t <= -1.55e+115) {
tmp = t_2;
} else if (t <= -2.8e-226) {
tmp = t_1;
} else if (t <= 2.5e-30) {
tmp = x + (y * ((z - t) / a));
} else if (t <= 2.3e+54) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = x + (z * (y / (a - t)))
t_2 = x - (y * ((z / t) + (-1.0d0)))
if (t <= (-1.55d+115)) then
tmp = t_2
else if (t <= (-2.8d-226)) then
tmp = t_1
else if (t <= 2.5d-30) then
tmp = x + (y * ((z - t) / a))
else if (t <= 2.3d+54) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / (a - t)));
double t_2 = x - (y * ((z / t) + -1.0));
double tmp;
if (t <= -1.55e+115) {
tmp = t_2;
} else if (t <= -2.8e-226) {
tmp = t_1;
} else if (t <= 2.5e-30) {
tmp = x + (y * ((z - t) / a));
} else if (t <= 2.3e+54) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / (a - t))) t_2 = x - (y * ((z / t) + -1.0)) tmp = 0 if t <= -1.55e+115: tmp = t_2 elif t <= -2.8e-226: tmp = t_1 elif t <= 2.5e-30: tmp = x + (y * ((z - t) / a)) elif t <= 2.3e+54: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / Float64(a - t)))) t_2 = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))) tmp = 0.0 if (t <= -1.55e+115) tmp = t_2; elseif (t <= -2.8e-226) tmp = t_1; elseif (t <= 2.5e-30) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); elseif (t <= 2.3e+54) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / (a - t))); t_2 = x - (y * ((z / t) + -1.0)); tmp = 0.0; if (t <= -1.55e+115) tmp = t_2; elseif (t <= -2.8e-226) tmp = t_1; elseif (t <= 2.5e-30) tmp = x + (y * ((z - t) / a)); elseif (t <= 2.3e+54) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+115], t$95$2, If[LessEqual[t, -2.8e-226], t$95$1, If[LessEqual[t, 2.5e-30], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+54], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a - t}\\
t_2 := x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+115}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-30}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.55000000000000002e115 or 2.29999999999999994e54 < t Initial program 68.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 61.5%
mul-1-neg61.5%
associate-/l*91.0%
distribute-lft-neg-in91.0%
div-sub91.0%
sub-neg91.0%
*-inverses91.0%
metadata-eval91.0%
Simplified91.0%
if -1.55000000000000002e115 < t < -2.80000000000000008e-226 or 2.49999999999999986e-30 < t < 2.29999999999999994e54Initial program 93.4%
associate-/l*96.5%
Simplified96.5%
clear-num96.5%
un-div-inv96.9%
Applied egg-rr96.9%
Taylor expanded in z around inf 87.3%
associate-/r/89.1%
Applied egg-rr89.1%
if -2.80000000000000008e-226 < t < 2.49999999999999986e-30Initial program 93.1%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in a around inf 87.7%
associate-/l*93.1%
Simplified93.1%
Final simplification91.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y (- a t))))))
(if (<= t -1.55e+115)
(- x (* y (+ (/ z t) -1.0)))
(if (<= t -4e-219)
t_1
(if (<= t 4.5e-30)
(+ x (* y (/ (- z t) a)))
(if (<= t 2e+54) t_1 (+ x (/ y (/ t (- t z))))))))))
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.55e+115) {
tmp = x - (y * ((z / t) + -1.0));
} else if (t <= -4e-219) {
tmp = t_1;
} else if (t <= 4.5e-30) {
tmp = x + (y * ((z - t) / a));
} else if (t <= 2e+54) {
tmp = t_1;
} else {
tmp = x + (y / (t / (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 + (z * (y / (a - t)))
if (t <= (-1.55d+115)) then
tmp = x - (y * ((z / t) + (-1.0d0)))
else if (t <= (-4d-219)) then
tmp = t_1
else if (t <= 4.5d-30) then
tmp = x + (y * ((z - t) / a))
else if (t <= 2d+54) then
tmp = t_1
else
tmp = x + (y / (t / (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 + (z * (y / (a - t)));
double tmp;
if (t <= -1.55e+115) {
tmp = x - (y * ((z / t) + -1.0));
} else if (t <= -4e-219) {
tmp = t_1;
} else if (t <= 4.5e-30) {
tmp = x + (y * ((z - t) / a));
} else if (t <= 2e+54) {
tmp = t_1;
} else {
tmp = x + (y / (t / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / (a - t))) tmp = 0 if t <= -1.55e+115: tmp = x - (y * ((z / t) + -1.0)) elif t <= -4e-219: tmp = t_1 elif t <= 4.5e-30: tmp = x + (y * ((z - t) / a)) elif t <= 2e+54: tmp = t_1 else: tmp = x + (y / (t / (t - z))) 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.55e+115) tmp = Float64(x - Float64(y * Float64(Float64(z / t) + -1.0))); elseif (t <= -4e-219) tmp = t_1; elseif (t <= 4.5e-30) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); elseif (t <= 2e+54) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(t / Float64(t - z)))); 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.55e+115) tmp = x - (y * ((z / t) + -1.0)); elseif (t <= -4e-219) tmp = t_1; elseif (t <= 4.5e-30) tmp = x + (y * ((z - t) / a)); elseif (t <= 2e+54) tmp = t_1; else tmp = x + (y / (t / (t - z))); 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.55e+115], N[(x - N[(y * N[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4e-219], t$95$1, If[LessEqual[t, 4.5e-30], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+54], t$95$1, N[(x + N[(y / N[(t / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a - t}\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+115}:\\
\;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-219}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-30}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{t - z}}\\
\end{array}
\end{array}
if t < -1.55000000000000002e115Initial program 68.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in a around 0 58.4%
mul-1-neg58.4%
associate-/l*87.5%
distribute-lft-neg-in87.5%
div-sub87.5%
sub-neg87.5%
*-inverses87.5%
metadata-eval87.5%
Simplified87.5%
if -1.55000000000000002e115 < t < -4.0000000000000001e-219 or 4.49999999999999967e-30 < t < 2.0000000000000002e54Initial program 93.4%
associate-/l*96.5%
Simplified96.5%
clear-num96.5%
un-div-inv96.9%
Applied egg-rr96.9%
Taylor expanded in z around inf 87.3%
associate-/r/89.1%
Applied egg-rr89.1%
if -4.0000000000000001e-219 < t < 4.49999999999999967e-30Initial program 93.1%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in a around inf 87.7%
associate-/l*93.1%
Simplified93.1%
if 2.0000000000000002e54 < t Initial program 68.5%
associate-/l*99.9%
Simplified99.9%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 93.3%
neg-mul-193.3%
distribute-neg-frac293.3%
neg-sub093.3%
associate--r-93.3%
neg-sub093.3%
Simplified93.3%
Final simplification91.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.52e+116) (not (<= t 2e+122))) (+ x y) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.52e+116) || !(t <= 2e+122)) {
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 <= (-1.52d+116)) .or. (.not. (t <= 2d+122))) 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 <= -1.52e+116) || !(t <= 2e+122)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.52e+116) or not (t <= 2e+122): tmp = x + y else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.52e+116) || !(t <= 2e+122)) 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 <= -1.52e+116) || ~((t <= 2e+122))) 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, -1.52e+116], N[Not[LessEqual[t, 2e+122]], $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 -1.52 \cdot 10^{+116} \lor \neg \left(t \leq 2 \cdot 10^{+122}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -1.52e116 or 2.00000000000000003e122 < t Initial program 68.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 86.9%
if -1.52e116 < t < 2.00000000000000003e122Initial program 91.2%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in z around inf 83.0%
associate-/l*87.9%
Simplified87.9%
Final simplification87.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.6e-32) (not (<= t 980000000.0))) (+ x y) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.6e-32) || !(t <= 980000000.0)) {
tmp = x + y;
} else {
tmp = x + (t * (y / 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 <= (-4.6d-32)) .or. (.not. (t <= 980000000.0d0))) then
tmp = x + y
else
tmp = x + (t * (y / 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 <= -4.6e-32) || !(t <= 980000000.0)) {
tmp = x + y;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.6e-32) or not (t <= 980000000.0): tmp = x + y else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.6e-32) || !(t <= 980000000.0)) tmp = Float64(x + y); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.6e-32) || ~((t <= 980000000.0))) tmp = x + y; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.6e-32], N[Not[LessEqual[t, 980000000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-32} \lor \neg \left(t \leq 980000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -4.6000000000000001e-32 or 9.8e8 < t Initial program 74.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 74.6%
if -4.6000000000000001e-32 < t < 9.8e8Initial program 95.0%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in a around inf 84.4%
Taylor expanded in z around 0 53.8%
mul-1-neg53.8%
distribute-lft-neg-out53.8%
*-commutative53.8%
Simplified53.8%
div-inv53.8%
*-commutative53.8%
associate-*l*55.1%
add-sqr-sqrt23.4%
sqrt-unprod47.9%
sqr-neg47.9%
sqrt-unprod27.8%
add-sqr-sqrt53.2%
div-inv53.2%
Applied egg-rr53.2%
Final simplification64.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8.8e+103) (not (<= t 6.5e+40))) (+ x y) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8.8e+103) || !(t <= 6.5e+40)) {
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 <= (-8.8d+103)) .or. (.not. (t <= 6.5d+40))) 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 <= -8.8e+103) || !(t <= 6.5e+40)) {
tmp = x + y;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8.8e+103) or not (t <= 6.5e+40): tmp = x + y else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8.8e+103) || !(t <= 6.5e+40)) 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 <= -8.8e+103) || ~((t <= 6.5e+40))) tmp = x + y; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8.8e+103], N[Not[LessEqual[t, 6.5e+40]], $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 -8.8 \cdot 10^{+103} \lor \neg \left(t \leq 6.5 \cdot 10^{+40}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -8.7999999999999997e103 or 6.5000000000000001e40 < t Initial program 69.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 81.6%
if -8.7999999999999997e103 < t < 6.5000000000000001e40Initial program 94.1%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in t around 0 74.2%
associate-/l*77.4%
Simplified77.4%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.2e+37) x (if (<= a 1.7e+93) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.2e+37) {
tmp = x;
} else if (a <= 1.7e+93) {
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 (a <= (-5.2d+37)) then
tmp = x
else if (a <= 1.7d+93) 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 (a <= -5.2e+37) {
tmp = x;
} else if (a <= 1.7e+93) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.2e+37: tmp = x elif a <= 1.7e+93: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.2e+37) tmp = x; elseif (a <= 1.7e+93) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.2e+37) tmp = x; elseif (a <= 1.7e+93) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.2e+37], x, If[LessEqual[a, 1.7e+93], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{+37}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+93}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.1999999999999998e37 or 1.7e93 < a Initial program 84.8%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in t around 0 79.4%
Taylor expanded in x around inf 65.3%
if -5.1999999999999998e37 < a < 1.7e93Initial program 83.1%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in t around inf 61.5%
Final simplification63.0%
(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 83.8%
associate-/l*98.0%
Simplified98.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 83.8%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in t around 0 60.5%
Taylor expanded in x around inf 49.3%
Final simplification49.3%
(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}
herbie shell --seed 2024074
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:alt
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))