
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= t 2e+90) (fma y (/ (- z t) (- z a)) x) (+ x (/ (- t z) (/ (- a z) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2e+90) {
tmp = fma(y, ((z - t) / (z - a)), x);
} else {
tmp = x + ((t - z) / ((a - z) / y));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2e+90) tmp = fma(y, Float64(Float64(z - t) / Float64(z - a)), x); else tmp = Float64(x + Float64(Float64(t - z) / Float64(Float64(a - z) / y))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2e+90], N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(N[(t - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2 \cdot 10^{+90}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - z}{\frac{a - z}{y}}\\
\end{array}
\end{array}
if t < 1.99999999999999993e90Initial program 83.4%
+-commutative83.4%
associate-/l*98.6%
fma-define98.6%
Simplified98.6%
if 1.99999999999999993e90 < t Initial program 84.4%
clear-num84.3%
inv-pow84.3%
Applied egg-rr84.3%
unpow-184.3%
associate-/r*99.7%
Simplified99.7%
clear-num99.9%
add-cube-cbrt99.1%
*-un-lft-identity99.1%
times-frac99.1%
pow299.1%
Applied egg-rr99.1%
times-frac99.1%
unpow299.1%
rem-3cbrt-lft99.9%
*-lft-identity99.9%
Simplified99.9%
Final simplification98.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+285)))
(* (- z t) (/ y (- z a)))
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+285)) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = x + t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+285)) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 1e+285): tmp = (z - t) * (y / (z - a)) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+285)) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 1e+285))) tmp = (z - t) * (y / (z - a)); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+285]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+285}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 9.9999999999999998e284 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 35.8%
Taylor expanded in x around 0 35.8%
associate-*l/88.3%
Simplified88.3%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 9.9999999999999998e284Initial program 99.8%
Final simplification96.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ t z)))))
(if (<= y -3800000000.0)
t_1
(if (<= y 1.55e+76) (+ y x) (if (<= y 8.4e+152) (* y (/ t a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double tmp;
if (y <= -3800000000.0) {
tmp = t_1;
} else if (y <= 1.55e+76) {
tmp = y + x;
} else if (y <= 8.4e+152) {
tmp = y * (t / a);
} 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 = y * (1.0d0 - (t / z))
if (y <= (-3800000000.0d0)) then
tmp = t_1
else if (y <= 1.55d+76) then
tmp = y + x
else if (y <= 8.4d+152) then
tmp = y * (t / a)
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 = y * (1.0 - (t / z));
double tmp;
if (y <= -3800000000.0) {
tmp = t_1;
} else if (y <= 1.55e+76) {
tmp = y + x;
} else if (y <= 8.4e+152) {
tmp = y * (t / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (t / z)) tmp = 0 if y <= -3800000000.0: tmp = t_1 elif y <= 1.55e+76: tmp = y + x elif y <= 8.4e+152: tmp = y * (t / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(t / z))) tmp = 0.0 if (y <= -3800000000.0) tmp = t_1; elseif (y <= 1.55e+76) tmp = Float64(y + x); elseif (y <= 8.4e+152) tmp = Float64(y * Float64(t / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (t / z)); tmp = 0.0; if (y <= -3800000000.0) tmp = t_1; elseif (y <= 1.55e+76) tmp = y + x; elseif (y <= 8.4e+152) tmp = y * (t / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3800000000.0], t$95$1, If[LessEqual[y, 1.55e+76], N[(y + x), $MachinePrecision], If[LessEqual[y, 8.4e+152], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;y \leq -3800000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+76}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;y \leq 8.4 \cdot 10^{+152}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.8e9 or 8.4000000000000007e152 < y Initial program 60.3%
Taylor expanded in x around 0 48.9%
Taylor expanded in a around 0 30.6%
associate-/l*56.5%
div-sub56.5%
*-inverses56.5%
Simplified56.5%
if -3.8e9 < y < 1.55000000000000006e76Initial program 99.3%
Taylor expanded in z around inf 76.7%
+-commutative76.7%
Simplified76.7%
if 1.55000000000000006e76 < y < 8.4000000000000007e152Initial program 75.5%
Taylor expanded in z around 0 53.3%
+-commutative53.3%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in y around inf 73.1%
+-commutative73.1%
Simplified73.1%
Taylor expanded in x around 0 52.4%
Final simplification67.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1950.0) (not (<= y 4.7e+48))) (* (- z t) (/ y (- z a))) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1950.0) || !(y <= 4.7e+48)) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = y + 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 ((y <= (-1950.0d0)) .or. (.not. (y <= 4.7d+48))) then
tmp = (z - t) * (y / (z - a))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1950.0) || !(y <= 4.7e+48)) {
tmp = (z - t) * (y / (z - a));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1950.0) or not (y <= 4.7e+48): tmp = (z - t) * (y / (z - a)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1950.0) || !(y <= 4.7e+48)) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1950.0) || ~((y <= 4.7e+48))) tmp = (z - t) * (y / (z - a)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1950.0], N[Not[LessEqual[y, 4.7e+48]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1950 \lor \neg \left(y \leq 4.7 \cdot 10^{+48}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if y < -1950 or 4.70000000000000012e48 < y Initial program 64.7%
Taylor expanded in x around 0 51.4%
associate-*l/77.1%
Simplified77.1%
if -1950 < y < 4.70000000000000012e48Initial program 100.0%
Taylor expanded in z around inf 78.3%
+-commutative78.3%
Simplified78.3%
Final simplification77.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.8e+46) (not (<= z 5.5e-46))) (- x (* y (+ (/ t z) -1.0))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.8e+46) || !(z <= 5.5e-46)) {
tmp = x - (y * ((t / z) + -1.0));
} 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 ((z <= (-5.8d+46)) .or. (.not. (z <= 5.5d-46))) then
tmp = x - (y * ((t / z) + (-1.0d0)))
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 ((z <= -5.8e+46) || !(z <= 5.5e-46)) {
tmp = x - (y * ((t / z) + -1.0));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.8e+46) or not (z <= 5.5e-46): tmp = x - (y * ((t / z) + -1.0)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.8e+46) || !(z <= 5.5e-46)) tmp = Float64(x - Float64(y * Float64(Float64(t / z) + -1.0))); 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 ((z <= -5.8e+46) || ~((z <= 5.5e-46))) tmp = x - (y * ((t / z) + -1.0)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.8e+46], N[Not[LessEqual[z, 5.5e-46]], $MachinePrecision]], N[(x - N[(y * N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+46} \lor \neg \left(z \leq 5.5 \cdot 10^{-46}\right):\\
\;\;\;\;x - y \cdot \left(\frac{t}{z} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -5.8000000000000004e46 or 5.49999999999999983e-46 < z Initial program 73.8%
Taylor expanded in a around 0 67.8%
associate-/l*39.6%
div-sub39.6%
*-inverses39.6%
Simplified88.2%
if -5.8000000000000004e46 < z < 5.49999999999999983e-46Initial program 93.9%
Taylor expanded in z around 0 70.6%
+-commutative70.6%
associate-/l*74.2%
Simplified74.2%
Final simplification81.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.26e+44) (not (<= a 0.0145))) (+ x (* y (/ (- t z) a))) (+ x (/ (- z t) (/ z y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.26e+44) || !(a <= 0.0145)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + ((z - t) / (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.26d+44)) .or. (.not. (a <= 0.0145d0))) then
tmp = x + (y * ((t - z) / a))
else
tmp = x + ((z - t) / (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.26e+44) || !(a <= 0.0145)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + ((z - t) / (z / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.26e+44) or not (a <= 0.0145): tmp = x + (y * ((t - z) / a)) else: tmp = x + ((z - t) / (z / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.26e+44) || !(a <= 0.0145)) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x + Float64(Float64(z - t) / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.26e+44) || ~((a <= 0.0145))) tmp = x + (y * ((t - z) / a)); else tmp = x + ((z - t) / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.26e+44], N[Not[LessEqual[a, 0.0145]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.26 \cdot 10^{+44} \lor \neg \left(a \leq 0.0145\right):\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - t}{\frac{z}{y}}\\
\end{array}
\end{array}
if a < -1.25999999999999996e44 or 0.0145000000000000007 < a Initial program 81.5%
Taylor expanded in a around inf 73.9%
mul-1-neg73.9%
unsub-neg73.9%
associate-/l*87.5%
Simplified87.5%
if -1.25999999999999996e44 < a < 0.0145000000000000007Initial program 85.3%
clear-num85.2%
inv-pow85.2%
Applied egg-rr85.2%
unpow-185.2%
associate-/r*97.7%
Simplified97.7%
clear-num97.8%
add-cube-cbrt97.0%
*-un-lft-identity97.0%
times-frac96.9%
pow296.9%
Applied egg-rr96.9%
times-frac97.0%
unpow297.0%
rem-3cbrt-lft97.8%
*-lft-identity97.8%
Simplified97.8%
Taylor expanded in z around inf 84.3%
Final simplification85.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.4e+43) (not (<= a 0.00185))) (+ x (/ y (/ a (- t z)))) (+ x (/ (- z t) (/ z y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.4e+43) || !(a <= 0.00185)) {
tmp = x + (y / (a / (t - z)));
} else {
tmp = x + ((z - t) / (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.4d+43)) .or. (.not. (a <= 0.00185d0))) then
tmp = x + (y / (a / (t - z)))
else
tmp = x + ((z - t) / (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.4e+43) || !(a <= 0.00185)) {
tmp = x + (y / (a / (t - z)));
} else {
tmp = x + ((z - t) / (z / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.4e+43) or not (a <= 0.00185): tmp = x + (y / (a / (t - z))) else: tmp = x + ((z - t) / (z / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.4e+43) || !(a <= 0.00185)) tmp = Float64(x + Float64(y / Float64(a / Float64(t - z)))); else tmp = Float64(x + Float64(Float64(z - t) / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.4e+43) || ~((a <= 0.00185))) tmp = x + (y / (a / (t - z))); else tmp = x + ((z - t) / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.4e+43], N[Not[LessEqual[a, 0.00185]], $MachinePrecision]], N[(x + N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{+43} \lor \neg \left(a \leq 0.00185\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{t - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - t}{\frac{z}{y}}\\
\end{array}
\end{array}
if a < -2.40000000000000023e43 or 0.0018500000000000001 < a Initial program 81.5%
Taylor expanded in a around inf 73.9%
mul-1-neg73.9%
unsub-neg73.9%
associate-/l*87.5%
Simplified87.5%
clear-num87.4%
un-div-inv87.5%
Applied egg-rr87.5%
if -2.40000000000000023e43 < a < 0.0018500000000000001Initial program 85.3%
clear-num85.2%
inv-pow85.2%
Applied egg-rr85.2%
unpow-185.2%
associate-/r*97.7%
Simplified97.7%
clear-num97.8%
add-cube-cbrt97.0%
*-un-lft-identity97.0%
times-frac96.9%
pow296.9%
Applied egg-rr96.9%
times-frac97.0%
unpow297.0%
rem-3cbrt-lft97.8%
*-lft-identity97.8%
Simplified97.8%
Taylor expanded in z around inf 84.3%
Final simplification85.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.5e+46) (not (<= z 8.5e+79))) (+ y x) (+ x (/ (* t y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.5e+46) || !(z <= 8.5e+79)) {
tmp = y + x;
} 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 ((z <= (-6.5d+46)) .or. (.not. (z <= 8.5d+79))) then
tmp = y + x
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 ((z <= -6.5e+46) || !(z <= 8.5e+79)) {
tmp = y + x;
} else {
tmp = x + ((t * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.5e+46) or not (z <= 8.5e+79): tmp = y + x else: tmp = x + ((t * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.5e+46) || !(z <= 8.5e+79)) tmp = Float64(y + x); else tmp = Float64(x + Float64(Float64(t * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.5e+46) || ~((z <= 8.5e+79))) tmp = y + x; else tmp = x + ((t * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.5e+46], N[Not[LessEqual[z, 8.5e+79]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+46} \lor \neg \left(z \leq 8.5 \cdot 10^{+79}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\end{array}
\end{array}
if z < -6.50000000000000008e46 or 8.4999999999999998e79 < z Initial program 70.3%
Taylor expanded in z around inf 82.5%
+-commutative82.5%
Simplified82.5%
if -6.50000000000000008e46 < z < 8.4999999999999998e79Initial program 93.6%
Taylor expanded in z around 0 71.1%
Final simplification76.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.2e+46) (not (<= z 3.2e-44))) (+ y x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.2e+46) || !(z <= 3.2e-44)) {
tmp = y + x;
} 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 ((z <= (-5.2d+46)) .or. (.not. (z <= 3.2d-44))) then
tmp = y + x
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 ((z <= -5.2e+46) || !(z <= 3.2e-44)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.2e+46) or not (z <= 3.2e-44): tmp = y + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.2e+46) || !(z <= 3.2e-44)) tmp = Float64(y + x); 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 ((z <= -5.2e+46) || ~((z <= 3.2e-44))) tmp = y + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.2e+46], N[Not[LessEqual[z, 3.2e-44]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+46} \lor \neg \left(z \leq 3.2 \cdot 10^{-44}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -5.20000000000000027e46 or 3.19999999999999995e-44 < z Initial program 73.8%
Taylor expanded in z around inf 80.3%
+-commutative80.3%
Simplified80.3%
if -5.20000000000000027e46 < z < 3.19999999999999995e-44Initial program 93.9%
Taylor expanded in z around 0 70.6%
+-commutative70.6%
associate-/l*74.2%
Simplified74.2%
Final simplification77.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.22e+172) y (if (<= y 1.2e+131) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.22e+172) {
tmp = y;
} else if (y <= 1.2e+131) {
tmp = x;
} else {
tmp = 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 <= (-1.22d+172)) then
tmp = y
else if (y <= 1.2d+131) then
tmp = x
else
tmp = 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 <= -1.22e+172) {
tmp = y;
} else if (y <= 1.2e+131) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.22e+172: tmp = y elif y <= 1.2e+131: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.22e+172) tmp = y; elseif (y <= 1.2e+131) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.22e+172) tmp = y; elseif (y <= 1.2e+131) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.22e+172], y, If[LessEqual[y, 1.2e+131], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.22 \cdot 10^{+172}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+131}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.21999999999999999e172 or 1.2e131 < y Initial program 49.4%
Taylor expanded in x around 0 47.8%
Taylor expanded in z around inf 40.6%
if -1.21999999999999999e172 < y < 1.2e131Initial program 95.0%
Taylor expanded in x around inf 61.9%
Final simplification56.6%
(FPCore (x y z t a) :precision binary64 (+ x (/ (- t z) (/ (- a z) y))))
double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / ((a - z) / y));
}
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 + ((t - z) / ((a - z) / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / ((a - z) / y));
}
def code(x, y, z, t, a): return x + ((t - z) / ((a - z) / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(t - z) / Float64(Float64(a - z) / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((t - z) / ((a - z) / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(t - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{t - z}{\frac{a - z}{y}}
\end{array}
Initial program 83.6%
clear-num83.5%
inv-pow83.5%
Applied egg-rr83.5%
unpow-183.5%
associate-/r*96.8%
Simplified96.8%
clear-num96.9%
add-cube-cbrt96.2%
*-un-lft-identity96.2%
times-frac96.2%
pow296.2%
Applied egg-rr96.2%
times-frac96.2%
unpow296.2%
rem-3cbrt-lft96.9%
*-lft-identity96.9%
Simplified96.9%
Final simplification96.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 6.2e+259) (+ y x) (* t (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 6.2e+259) {
tmp = y + x;
} else {
tmp = 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 <= 6.2d+259) then
tmp = y + x
else
tmp = 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 <= 6.2e+259) {
tmp = y + x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 6.2e+259: tmp = y + x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 6.2e+259) tmp = Float64(y + x); else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 6.2e+259) tmp = y + x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 6.2e+259], N[(y + x), $MachinePrecision], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.2 \cdot 10^{+259}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < 6.2000000000000007e259Initial program 84.2%
Taylor expanded in z around inf 63.0%
+-commutative63.0%
Simplified63.0%
if 6.2000000000000007e259 < t Initial program 65.5%
Taylor expanded in x around 0 65.5%
Taylor expanded in z around 0 65.5%
associate-/l*99.8%
Simplified99.8%
Final simplification64.2%
(FPCore (x y z t a) :precision binary64 (+ y x))
double code(double x, double y, double z, double t, double a) {
return y + 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 = y + x
end function
public static double code(double x, double y, double z, double t, double a) {
return y + x;
}
def code(x, y, z, t, a): return y + x
function code(x, y, z, t, a) return Float64(y + x) end
function tmp = code(x, y, z, t, a) tmp = y + x; end
code[x_, y_, z_, t_, a_] := N[(y + x), $MachinePrecision]
\begin{array}{l}
\\
y + x
\end{array}
Initial program 83.6%
Taylor expanded in z around inf 61.2%
+-commutative61.2%
Simplified61.2%
Final simplification61.2%
(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.6%
Taylor expanded in x around inf 49.4%
Final simplification49.4%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (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 / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024077
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))