
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / 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) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{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) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / 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) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
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 + (a * ((z - y) / ((t - z) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
def code(x, y, z, t, a): return x + (a * ((z - y) / ((t - z) + 1.0)))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((z - y) / ((t - z) + 1.0))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
\end{array}
Initial program 95.8%
associate-/r/99.0%
Simplified99.0%
Final simplification99.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- (/ a (/ z y)) a)))
(t_2 (+ x (* a (/ (- z y) t))))
(t_3 (- x (* y a))))
(if (<= t -3.1e+32)
t_2
(if (<= t -7.6e-67)
t_1
(if (<= t -5e-193)
t_3
(if (<= t 2.7e-289) t_1 (if (<= t 1.12e-7) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((a / (z / y)) - a);
double t_2 = x + (a * ((z - y) / t));
double t_3 = x - (y * a);
double tmp;
if (t <= -3.1e+32) {
tmp = t_2;
} else if (t <= -7.6e-67) {
tmp = t_1;
} else if (t <= -5e-193) {
tmp = t_3;
} else if (t <= 2.7e-289) {
tmp = t_1;
} else if (t <= 1.12e-7) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = x + ((a / (z / y)) - a)
t_2 = x + (a * ((z - y) / t))
t_3 = x - (y * a)
if (t <= (-3.1d+32)) then
tmp = t_2
else if (t <= (-7.6d-67)) then
tmp = t_1
else if (t <= (-5d-193)) then
tmp = t_3
else if (t <= 2.7d-289) then
tmp = t_1
else if (t <= 1.12d-7) then
tmp = t_3
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 + ((a / (z / y)) - a);
double t_2 = x + (a * ((z - y) / t));
double t_3 = x - (y * a);
double tmp;
if (t <= -3.1e+32) {
tmp = t_2;
} else if (t <= -7.6e-67) {
tmp = t_1;
} else if (t <= -5e-193) {
tmp = t_3;
} else if (t <= 2.7e-289) {
tmp = t_1;
} else if (t <= 1.12e-7) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((a / (z / y)) - a) t_2 = x + (a * ((z - y) / t)) t_3 = x - (y * a) tmp = 0 if t <= -3.1e+32: tmp = t_2 elif t <= -7.6e-67: tmp = t_1 elif t <= -5e-193: tmp = t_3 elif t <= 2.7e-289: tmp = t_1 elif t <= 1.12e-7: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(a / Float64(z / y)) - a)) t_2 = Float64(x + Float64(a * Float64(Float64(z - y) / t))) t_3 = Float64(x - Float64(y * a)) tmp = 0.0 if (t <= -3.1e+32) tmp = t_2; elseif (t <= -7.6e-67) tmp = t_1; elseif (t <= -5e-193) tmp = t_3; elseif (t <= 2.7e-289) tmp = t_1; elseif (t <= 1.12e-7) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((a / (z / y)) - a); t_2 = x + (a * ((z - y) / t)); t_3 = x - (y * a); tmp = 0.0; if (t <= -3.1e+32) tmp = t_2; elseif (t <= -7.6e-67) tmp = t_1; elseif (t <= -5e-193) tmp = t_3; elseif (t <= 2.7e-289) tmp = t_1; elseif (t <= 1.12e-7) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e+32], t$95$2, If[LessEqual[t, -7.6e-67], t$95$1, If[LessEqual[t, -5e-193], t$95$3, If[LessEqual[t, 2.7e-289], t$95$1, If[LessEqual[t, 1.12e-7], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{a}{\frac{z}{y}} - a\right)\\
t_2 := x + a \cdot \frac{z - y}{t}\\
t_3 := x - y \cdot a\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{+32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -7.6 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-193}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-289}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-7}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.09999999999999993e32 or 1.12e-7 < t Initial program 95.7%
associate-/r/98.1%
Simplified98.1%
Taylor expanded in t around inf 81.9%
if -3.09999999999999993e32 < t < -7.59999999999999976e-67 or -5.0000000000000005e-193 < t < 2.7e-289Initial program 95.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.3%
mul-1-neg81.3%
Simplified81.3%
Taylor expanded in y around 0 79.1%
mul-1-neg79.1%
unsub-neg79.1%
associate-/l*83.6%
Simplified83.6%
if -7.59999999999999976e-67 < t < -5.0000000000000005e-193 or 2.7e-289 < t < 1.12e-7Initial program 96.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 84.2%
Taylor expanded in t around 0 83.6%
Final simplification82.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.5e+109)
(+ x (/ a (+ (/ t z) -1.0)))
(if (<= z 2.9e+61)
(+ x (* a (/ (- z y) (+ t 1.0))))
(+ x (- (/ a (/ z y)) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+109) {
tmp = x + (a / ((t / z) + -1.0));
} else if (z <= 2.9e+61) {
tmp = x + (a * ((z - y) / (t + 1.0)));
} else {
tmp = x + ((a / (z / 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 <= (-3.5d+109)) then
tmp = x + (a / ((t / z) + (-1.0d0)))
else if (z <= 2.9d+61) then
tmp = x + (a * ((z - y) / (t + 1.0d0)))
else
tmp = x + ((a / (z / 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 <= -3.5e+109) {
tmp = x + (a / ((t / z) + -1.0));
} else if (z <= 2.9e+61) {
tmp = x + (a * ((z - y) / (t + 1.0)));
} else {
tmp = x + ((a / (z / y)) - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+109: tmp = x + (a / ((t / z) + -1.0)) elif z <= 2.9e+61: tmp = x + (a * ((z - y) / (t + 1.0))) else: tmp = x + ((a / (z / y)) - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+109) tmp = Float64(x + Float64(a / Float64(Float64(t / z) + -1.0))); elseif (z <= 2.9e+61) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / Float64(t + 1.0)))); else tmp = Float64(x + Float64(Float64(a / Float64(z / y)) - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e+109) tmp = x + (a / ((t / z) + -1.0)); elseif (z <= 2.9e+61) tmp = x + (a * ((z - y) / (t + 1.0))); else tmp = x + ((a / (z / y)) - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+109], N[(x + N[(a / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+61], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+109}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+61}:\\
\;\;\;\;x + a \cdot \frac{z - y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\
\end{array}
\end{array}
if z < -3.49999999999999983e109Initial program 89.2%
associate-/r/100.0%
Simplified100.0%
*-commutative100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 61.2%
mul-1-neg61.2%
associate-/l*91.4%
distribute-neg-frac91.4%
div-sub91.4%
*-inverses91.4%
sub-neg91.4%
metadata-eval91.4%
Simplified91.4%
Taylor expanded in t around inf 91.4%
if -3.49999999999999983e109 < z < 2.9000000000000001e61Initial program 98.6%
associate-/r/98.4%
Simplified98.4%
Taylor expanded in z around 0 95.3%
if 2.9000000000000001e61 < z Initial program 91.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 89.8%
mul-1-neg89.8%
Simplified89.8%
Taylor expanded in y around 0 82.9%
mul-1-neg82.9%
unsub-neg82.9%
associate-/l*89.8%
Simplified89.8%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.3e+131)
(- x a)
(if (<= z -1.2e+44)
(+ x (/ (* y a) z))
(if (or (<= z -63000000.0) (not (<= z 3.95e+59)))
(- x a)
(- x (* y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e+131) {
tmp = x - a;
} else if (z <= -1.2e+44) {
tmp = x + ((y * a) / z);
} else if ((z <= -63000000.0) || !(z <= 3.95e+59)) {
tmp = x - a;
} else {
tmp = x - (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 <= (-1.3d+131)) then
tmp = x - a
else if (z <= (-1.2d+44)) then
tmp = x + ((y * a) / z)
else if ((z <= (-63000000.0d0)) .or. (.not. (z <= 3.95d+59))) then
tmp = x - a
else
tmp = x - (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 <= -1.3e+131) {
tmp = x - a;
} else if (z <= -1.2e+44) {
tmp = x + ((y * a) / z);
} else if ((z <= -63000000.0) || !(z <= 3.95e+59)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.3e+131: tmp = x - a elif z <= -1.2e+44: tmp = x + ((y * a) / z) elif (z <= -63000000.0) or not (z <= 3.95e+59): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.3e+131) tmp = Float64(x - a); elseif (z <= -1.2e+44) tmp = Float64(x + Float64(Float64(y * a) / z)); elseif ((z <= -63000000.0) || !(z <= 3.95e+59)) tmp = Float64(x - a); else tmp = Float64(x - Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.3e+131) tmp = x - a; elseif (z <= -1.2e+44) tmp = x + ((y * a) / z); elseif ((z <= -63000000.0) || ~((z <= 3.95e+59))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e+131], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.2e+44], N[(x + N[(N[(y * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -63000000.0], N[Not[LessEqual[z, 3.95e+59]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+131}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{+44}:\\
\;\;\;\;x + \frac{y \cdot a}{z}\\
\mathbf{elif}\;z \leq -63000000 \lor \neg \left(z \leq 3.95 \cdot 10^{+59}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -1.3e131 or -1.20000000000000007e44 < z < -6.3e7 or 3.95e59 < z Initial program 90.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.9%
if -1.3e131 < z < -1.20000000000000007e44Initial program 94.7%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around inf 83.8%
mul-1-neg83.8%
Simplified83.8%
Taylor expanded in y around inf 89.1%
associate-*r/89.1%
neg-mul-189.1%
Simplified89.1%
Taylor expanded in x around 0 84.0%
if -6.3e7 < z < 3.95e59Initial program 99.1%
associate-/r/98.2%
Simplified98.2%
Taylor expanded in z around 0 87.1%
Taylor expanded in t around 0 70.4%
Final simplification74.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ a (/ t y)))))
(if (<= t -1.05e+129)
t_1
(if (<= t -4.4e-60) (- x a) (if (<= t 0.96) (- x (* y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a / (t / y));
double tmp;
if (t <= -1.05e+129) {
tmp = t_1;
} else if (t <= -4.4e-60) {
tmp = x - a;
} else if (t <= 0.96) {
tmp = x - (y * 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 = x - (a / (t / y))
if (t <= (-1.05d+129)) then
tmp = t_1
else if (t <= (-4.4d-60)) then
tmp = x - a
else if (t <= 0.96d0) then
tmp = x - (y * 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 = x - (a / (t / y));
double tmp;
if (t <= -1.05e+129) {
tmp = t_1;
} else if (t <= -4.4e-60) {
tmp = x - a;
} else if (t <= 0.96) {
tmp = x - (y * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a / (t / y)) tmp = 0 if t <= -1.05e+129: tmp = t_1 elif t <= -4.4e-60: tmp = x - a elif t <= 0.96: tmp = x - (y * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a / Float64(t / y))) tmp = 0.0 if (t <= -1.05e+129) tmp = t_1; elseif (t <= -4.4e-60) tmp = Float64(x - a); elseif (t <= 0.96) tmp = Float64(x - Float64(y * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a / (t / y)); tmp = 0.0; if (t <= -1.05e+129) tmp = t_1; elseif (t <= -4.4e-60) tmp = x - a; elseif (t <= 0.96) tmp = x - (y * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+129], t$95$1, If[LessEqual[t, -4.4e-60], N[(x - a), $MachinePrecision], If[LessEqual[t, 0.96], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{a}{\frac{t}{y}}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-60}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 0.96:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.04999999999999998e129 or 0.95999999999999996 < t Initial program 95.8%
associate-/r/97.8%
Simplified97.8%
Taylor expanded in z around 0 77.5%
Taylor expanded in t around inf 76.9%
associate-/l*82.0%
Simplified82.0%
if -1.04999999999999998e129 < t < -4.3999999999999998e-60Initial program 97.1%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 74.6%
if -4.3999999999999998e-60 < t < 0.95999999999999996Initial program 95.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 76.3%
Taylor expanded in t around 0 75.9%
Final simplification78.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.4e+28) (not (<= t 1.12e-7))) (+ x (* a (/ (- z y) t))) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.4e+28) || !(t <= 1.12e-7)) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x - (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 <= (-2.4d+28)) .or. (.not. (t <= 1.12d-7))) then
tmp = x + (a * ((z - y) / t))
else
tmp = x - (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 <= -2.4e+28) || !(t <= 1.12e-7)) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.4e+28) or not (t <= 1.12e-7): tmp = x + (a * ((z - y) / t)) else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.4e+28) || !(t <= 1.12e-7)) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); else tmp = Float64(x - Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.4e+28) || ~((t <= 1.12e-7))) tmp = x + (a * ((z - y) / t)); else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.4e+28], N[Not[LessEqual[t, 1.12e-7]], $MachinePrecision]], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+28} \lor \neg \left(t \leq 1.12 \cdot 10^{-7}\right):\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if t < -2.39999999999999981e28 or 1.12e-7 < t Initial program 95.8%
associate-/r/98.2%
Simplified98.2%
Taylor expanded in t around inf 81.6%
if -2.39999999999999981e28 < t < 1.12e-7Initial program 95.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 74.7%
Taylor expanded in t around 0 75.3%
Final simplification78.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.3e+109) (not (<= z 8e+59))) (+ x (- (/ a (/ z y)) a)) (- x (/ a (/ (+ t 1.0) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.3e+109) || !(z <= 8e+59)) {
tmp = x + ((a / (z / y)) - a);
} else {
tmp = x - (a / ((t + 1.0) / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.3d+109)) .or. (.not. (z <= 8d+59))) then
tmp = x + ((a / (z / y)) - a)
else
tmp = x - (a / ((t + 1.0d0) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.3e+109) || !(z <= 8e+59)) {
tmp = x + ((a / (z / y)) - a);
} else {
tmp = x - (a / ((t + 1.0) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.3e+109) or not (z <= 8e+59): tmp = x + ((a / (z / y)) - a) else: tmp = x - (a / ((t + 1.0) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.3e+109) || !(z <= 8e+59)) tmp = Float64(x + Float64(Float64(a / Float64(z / y)) - a)); else tmp = Float64(x - Float64(a / Float64(Float64(t + 1.0) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.3e+109) || ~((z <= 8e+59))) tmp = x + ((a / (z / y)) - a); else tmp = x - (a / ((t + 1.0) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.3e+109], N[Not[LessEqual[z, 8e+59]], $MachinePrecision]], N[(x + N[(N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x - N[(a / N[(N[(t + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+109} \lor \neg \left(z \leq 8 \cdot 10^{+59}\right):\\
\;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t + 1}{y}}\\
\end{array}
\end{array}
if z < -3.2999999999999999e109 or 7.99999999999999977e59 < z Initial program 90.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 90.5%
mul-1-neg90.5%
Simplified90.5%
Taylor expanded in y around 0 87.0%
mul-1-neg87.0%
unsub-neg87.0%
associate-/l*90.5%
Simplified90.5%
if -3.2999999999999999e109 < z < 7.99999999999999977e59Initial program 98.6%
associate-/r/98.4%
Simplified98.4%
Taylor expanded in z around 0 84.9%
associate-/l*88.3%
Simplified88.3%
Final simplification89.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.3e+109) (- x (* a (/ (- y z) (- z)))) (if (<= z 4e+59) (- x (/ a (/ (+ t 1.0) y))) (+ x (- (/ a (/ z y)) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.3e+109) {
tmp = x - (a * ((y - z) / -z));
} else if (z <= 4e+59) {
tmp = x - (a / ((t + 1.0) / y));
} else {
tmp = x + ((a / (z / 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 <= (-3.3d+109)) then
tmp = x - (a * ((y - z) / -z))
else if (z <= 4d+59) then
tmp = x - (a / ((t + 1.0d0) / y))
else
tmp = x + ((a / (z / 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 <= -3.3e+109) {
tmp = x - (a * ((y - z) / -z));
} else if (z <= 4e+59) {
tmp = x - (a / ((t + 1.0) / y));
} else {
tmp = x + ((a / (z / y)) - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.3e+109: tmp = x - (a * ((y - z) / -z)) elif z <= 4e+59: tmp = x - (a / ((t + 1.0) / y)) else: tmp = x + ((a / (z / y)) - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.3e+109) tmp = Float64(x - Float64(a * Float64(Float64(y - z) / Float64(-z)))); elseif (z <= 4e+59) tmp = Float64(x - Float64(a / Float64(Float64(t + 1.0) / y))); else tmp = Float64(x + Float64(Float64(a / Float64(z / y)) - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.3e+109) tmp = x - (a * ((y - z) / -z)); elseif (z <= 4e+59) tmp = x - (a / ((t + 1.0) / y)); else tmp = x + ((a / (z / y)) - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.3e+109], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / (-z)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+59], N[(x - N[(a / N[(N[(t + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+109}:\\
\;\;\;\;x - a \cdot \frac{y - z}{-z}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+59}:\\
\;\;\;\;x - \frac{a}{\frac{t + 1}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\
\end{array}
\end{array}
if z < -3.2999999999999999e109Initial program 89.2%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 91.2%
mul-1-neg91.2%
Simplified91.2%
if -3.2999999999999999e109 < z < 3.99999999999999989e59Initial program 98.6%
associate-/r/98.4%
Simplified98.4%
Taylor expanded in z around 0 84.9%
associate-/l*88.3%
Simplified88.3%
if 3.99999999999999989e59 < z Initial program 91.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 89.8%
mul-1-neg89.8%
Simplified89.8%
Taylor expanded in y around 0 82.9%
mul-1-neg82.9%
unsub-neg82.9%
associate-/l*89.8%
Simplified89.8%
Final simplification89.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e+109) (+ x (/ a (+ (/ t z) -1.0))) (if (<= z 1.36e+60) (- x (/ a (/ (+ t 1.0) y))) (+ x (- (/ a (/ z y)) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+109) {
tmp = x + (a / ((t / z) + -1.0));
} else if (z <= 1.36e+60) {
tmp = x - (a / ((t + 1.0) / y));
} else {
tmp = x + ((a / (z / 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 <= (-3.8d+109)) then
tmp = x + (a / ((t / z) + (-1.0d0)))
else if (z <= 1.36d+60) then
tmp = x - (a / ((t + 1.0d0) / y))
else
tmp = x + ((a / (z / 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 <= -3.8e+109) {
tmp = x + (a / ((t / z) + -1.0));
} else if (z <= 1.36e+60) {
tmp = x - (a / ((t + 1.0) / y));
} else {
tmp = x + ((a / (z / y)) - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+109: tmp = x + (a / ((t / z) + -1.0)) elif z <= 1.36e+60: tmp = x - (a / ((t + 1.0) / y)) else: tmp = x + ((a / (z / y)) - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+109) tmp = Float64(x + Float64(a / Float64(Float64(t / z) + -1.0))); elseif (z <= 1.36e+60) tmp = Float64(x - Float64(a / Float64(Float64(t + 1.0) / y))); else tmp = Float64(x + Float64(Float64(a / Float64(z / y)) - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e+109) tmp = x + (a / ((t / z) + -1.0)); elseif (z <= 1.36e+60) tmp = x - (a / ((t + 1.0) / y)); else tmp = x + ((a / (z / y)) - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+109], N[(x + N[(a / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e+60], N[(x - N[(a / N[(N[(t + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+109}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{+60}:\\
\;\;\;\;x - \frac{a}{\frac{t + 1}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\
\end{array}
\end{array}
if z < -3.80000000000000039e109Initial program 89.2%
associate-/r/100.0%
Simplified100.0%
*-commutative100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 61.2%
mul-1-neg61.2%
associate-/l*91.4%
distribute-neg-frac91.4%
div-sub91.4%
*-inverses91.4%
sub-neg91.4%
metadata-eval91.4%
Simplified91.4%
Taylor expanded in t around inf 91.4%
if -3.80000000000000039e109 < z < 1.36000000000000002e60Initial program 98.6%
associate-/r/98.4%
Simplified98.4%
Taylor expanded in z around 0 84.9%
associate-/l*88.3%
Simplified88.3%
if 1.36000000000000002e60 < z Initial program 91.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 89.8%
mul-1-neg89.8%
Simplified89.8%
Taylor expanded in y around 0 82.9%
mul-1-neg82.9%
unsub-neg82.9%
associate-/l*89.8%
Simplified89.8%
Final simplification89.1%
(FPCore (x y z t a) :precision binary64 (+ x (* (/ a (+ (- t z) 1.0)) (- z y))))
double code(double x, double y, double z, double t, double a) {
return x + ((a / ((t - z) + 1.0)) * (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 + ((a / ((t - z) + 1.0d0)) * (z - y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((a / ((t - z) + 1.0)) * (z - y));
}
def code(x, y, z, t, a): return x + ((a / ((t - z) + 1.0)) * (z - y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(a / Float64(Float64(t - z) + 1.0)) * Float64(z - y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((a / ((t - z) + 1.0)) * (z - y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(a / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{a}{\left(t - z\right) + 1} \cdot \left(z - y\right)
\end{array}
Initial program 95.8%
clear-num95.7%
associate-/r/95.8%
clear-num96.3%
Applied egg-rr96.3%
Final simplification96.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.55e+131)
(- x a)
(if (<= z -1.02e-165)
x
(if (<= z -1e-225) (* y (- a)) (if (<= z 3.2e+75) x (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.55e+131) {
tmp = x - a;
} else if (z <= -1.02e-165) {
tmp = x;
} else if (z <= -1e-225) {
tmp = y * -a;
} else if (z <= 3.2e+75) {
tmp = x;
} else {
tmp = x - 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 <= (-1.55d+131)) then
tmp = x - a
else if (z <= (-1.02d-165)) then
tmp = x
else if (z <= (-1d-225)) then
tmp = y * -a
else if (z <= 3.2d+75) then
tmp = x
else
tmp = x - 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 <= -1.55e+131) {
tmp = x - a;
} else if (z <= -1.02e-165) {
tmp = x;
} else if (z <= -1e-225) {
tmp = y * -a;
} else if (z <= 3.2e+75) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.55e+131: tmp = x - a elif z <= -1.02e-165: tmp = x elif z <= -1e-225: tmp = y * -a elif z <= 3.2e+75: tmp = x else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.55e+131) tmp = Float64(x - a); elseif (z <= -1.02e-165) tmp = x; elseif (z <= -1e-225) tmp = Float64(y * Float64(-a)); elseif (z <= 3.2e+75) tmp = x; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.55e+131) tmp = x - a; elseif (z <= -1.02e-165) tmp = x; elseif (z <= -1e-225) tmp = y * -a; elseif (z <= 3.2e+75) tmp = x; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.55e+131], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.02e-165], x, If[LessEqual[z, -1e-225], N[(y * (-a)), $MachinePrecision], If[LessEqual[z, 3.2e+75], x, N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+131}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-165}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-225}:\\
\;\;\;\;y \cdot \left(-a\right)\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+75}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.55000000000000008e131 or 3.19999999999999985e75 < z Initial program 90.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 82.7%
if -1.55000000000000008e131 < z < -1.02e-165 or -9.9999999999999996e-226 < z < 3.19999999999999985e75Initial program 98.1%
associate-/r/98.4%
Simplified98.4%
Taylor expanded in z around 0 83.1%
Taylor expanded in x around inf 59.7%
if -1.02e-165 < z < -9.9999999999999996e-226Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in t around 0 87.6%
Taylor expanded in x around 0 83.9%
mul-1-neg83.9%
distribute-rgt-neg-in83.9%
Simplified83.9%
Final simplification67.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -132000000.0) (not (<= z 4e+59))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -132000000.0) || !(z <= 4e+59)) {
tmp = x - a;
} else {
tmp = x - (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 <= (-132000000.0d0)) .or. (.not. (z <= 4d+59))) then
tmp = x - a
else
tmp = x - (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 <= -132000000.0) || !(z <= 4e+59)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -132000000.0) or not (z <= 4e+59): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -132000000.0) || !(z <= 4e+59)) tmp = Float64(x - a); else tmp = Float64(x - Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -132000000.0) || ~((z <= 4e+59))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -132000000.0], N[Not[LessEqual[z, 4e+59]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -132000000 \lor \neg \left(z \leq 4 \cdot 10^{+59}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -1.32e8 or 3.99999999999999989e59 < z Initial program 91.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 76.4%
if -1.32e8 < z < 3.99999999999999989e59Initial program 99.1%
associate-/r/98.2%
Simplified98.2%
Taylor expanded in z around 0 87.1%
Taylor expanded in t around 0 70.4%
Final simplification73.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.55e+131) (not (<= z 4.8e+74))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.55e+131) || !(z <= 4.8e+74)) {
tmp = x - a;
} 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 ((z <= (-1.55d+131)) .or. (.not. (z <= 4.8d+74))) then
tmp = x - a
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 ((z <= -1.55e+131) || !(z <= 4.8e+74)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.55e+131) or not (z <= 4.8e+74): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.55e+131) || !(z <= 4.8e+74)) tmp = Float64(x - a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.55e+131) || ~((z <= 4.8e+74))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.55e+131], N[Not[LessEqual[z, 4.8e+74]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+131} \lor \neg \left(z \leq 4.8 \cdot 10^{+74}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.55000000000000008e131 or 4.80000000000000017e74 < z Initial program 90.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 82.7%
if -1.55000000000000008e131 < z < 4.80000000000000017e74Initial program 98.2%
associate-/r/98.5%
Simplified98.5%
Taylor expanded in z around 0 83.8%
Taylor expanded in x around inf 57.4%
Final simplification65.5%
(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 95.8%
associate-/r/99.0%
Simplified99.0%
Taylor expanded in z around 0 73.9%
Taylor expanded in x around inf 57.2%
Final simplification57.2%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * 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) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2023339
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:herbie-target
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))