
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
(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}
Initial program 98.4%
clear-num98.0%
un-div-inv98.7%
Applied egg-rr98.7%
Final simplification98.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* t (/ y z)))))
(if (<= z -9e+143)
(+ x y)
(if (<= z -6.3e-9)
t_1
(if (<= z -1.72e-18)
(+ x y)
(if (<= z 5.4e-40)
(+ x (/ y (/ a t)))
(if (<= z 6.2e+196) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t * (y / z));
double tmp;
if (z <= -9e+143) {
tmp = x + y;
} else if (z <= -6.3e-9) {
tmp = t_1;
} else if (z <= -1.72e-18) {
tmp = x + y;
} else if (z <= 5.4e-40) {
tmp = x + (y / (a / t));
} else if (z <= 6.2e+196) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (t * (y / z))
if (z <= (-9d+143)) then
tmp = x + y
else if (z <= (-6.3d-9)) then
tmp = t_1
else if (z <= (-1.72d-18)) then
tmp = x + y
else if (z <= 5.4d-40) then
tmp = x + (y / (a / t))
else if (z <= 6.2d+196) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t * (y / z));
double tmp;
if (z <= -9e+143) {
tmp = x + y;
} else if (z <= -6.3e-9) {
tmp = t_1;
} else if (z <= -1.72e-18) {
tmp = x + y;
} else if (z <= 5.4e-40) {
tmp = x + (y / (a / t));
} else if (z <= 6.2e+196) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t * (y / z)) tmp = 0 if z <= -9e+143: tmp = x + y elif z <= -6.3e-9: tmp = t_1 elif z <= -1.72e-18: tmp = x + y elif z <= 5.4e-40: tmp = x + (y / (a / t)) elif z <= 6.2e+196: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t * Float64(y / z))) tmp = 0.0 if (z <= -9e+143) tmp = Float64(x + y); elseif (z <= -6.3e-9) tmp = t_1; elseif (z <= -1.72e-18) tmp = Float64(x + y); elseif (z <= 5.4e-40) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 6.2e+196) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (t * (y / z)); tmp = 0.0; if (z <= -9e+143) tmp = x + y; elseif (z <= -6.3e-9) tmp = t_1; elseif (z <= -1.72e-18) tmp = x + y; elseif (z <= 5.4e-40) tmp = x + (y / (a / t)); elseif (z <= 6.2e+196) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+143], N[(x + y), $MachinePrecision], If[LessEqual[z, -6.3e-9], t$95$1, If[LessEqual[z, -1.72e-18], N[(x + y), $MachinePrecision], If[LessEqual[z, 5.4e-40], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+196], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+143}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -6.3 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.72 \cdot 10^{-18}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-40}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+196}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -8.9999999999999993e143 or -6.3000000000000002e-9 < z < -1.72e-18 or 6.2000000000000002e196 < z Initial program 100.0%
Taylor expanded in z around inf 90.5%
+-commutative90.5%
Simplified90.5%
if -8.9999999999999993e143 < z < -6.3000000000000002e-9 or 5.4e-40 < z < 6.2000000000000002e196Initial program 99.8%
Taylor expanded in a around 0 75.2%
+-commutative75.2%
associate-/l*85.2%
Simplified85.2%
Taylor expanded in z around 0 65.3%
mul-1-neg65.3%
associate-/l*71.5%
distribute-lft-neg-in71.5%
Simplified71.5%
+-commutative71.5%
distribute-lft-neg-out71.5%
unsub-neg71.5%
Applied egg-rr71.5%
if -1.72e-18 < z < 5.4e-40Initial program 96.3%
clear-num96.3%
un-div-inv98.0%
Applied egg-rr98.0%
Taylor expanded in z around 0 80.5%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ t z)))))
(if (<= z -6e+143)
(+ x y)
(if (<= z -3.6e-5)
t_1
(if (<= z -2.6e-18)
(+ x y)
(if (<= z 3.1e-40)
(+ x (/ y (/ a t)))
(if (<= z 6.2e+196) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (t / z));
double tmp;
if (z <= -6e+143) {
tmp = x + y;
} else if (z <= -3.6e-5) {
tmp = t_1;
} else if (z <= -2.6e-18) {
tmp = x + y;
} else if (z <= 3.1e-40) {
tmp = x + (y / (a / t));
} else if (z <= 6.2e+196) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y * (t / z))
if (z <= (-6d+143)) then
tmp = x + y
else if (z <= (-3.6d-5)) then
tmp = t_1
else if (z <= (-2.6d-18)) then
tmp = x + y
else if (z <= 3.1d-40) then
tmp = x + (y / (a / t))
else if (z <= 6.2d+196) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (t / z));
double tmp;
if (z <= -6e+143) {
tmp = x + y;
} else if (z <= -3.6e-5) {
tmp = t_1;
} else if (z <= -2.6e-18) {
tmp = x + y;
} else if (z <= 3.1e-40) {
tmp = x + (y / (a / t));
} else if (z <= 6.2e+196) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (t / z)) tmp = 0 if z <= -6e+143: tmp = x + y elif z <= -3.6e-5: tmp = t_1 elif z <= -2.6e-18: tmp = x + y elif z <= 3.1e-40: tmp = x + (y / (a / t)) elif z <= 6.2e+196: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(t / z))) tmp = 0.0 if (z <= -6e+143) tmp = Float64(x + y); elseif (z <= -3.6e-5) tmp = t_1; elseif (z <= -2.6e-18) tmp = Float64(x + y); elseif (z <= 3.1e-40) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 6.2e+196) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (t / z)); tmp = 0.0; if (z <= -6e+143) tmp = x + y; elseif (z <= -3.6e-5) tmp = t_1; elseif (z <= -2.6e-18) tmp = x + y; elseif (z <= 3.1e-40) tmp = x + (y / (a / t)); elseif (z <= 6.2e+196) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6e+143], N[(x + y), $MachinePrecision], If[LessEqual[z, -3.6e-5], t$95$1, If[LessEqual[z, -2.6e-18], N[(x + y), $MachinePrecision], If[LessEqual[z, 3.1e-40], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+196], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+143}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{-18}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-40}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+196}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -6.0000000000000001e143 or -3.60000000000000009e-5 < z < -2.6e-18 or 6.2000000000000002e196 < z Initial program 100.0%
Taylor expanded in z around inf 90.5%
+-commutative90.5%
Simplified90.5%
if -6.0000000000000001e143 < z < -3.60000000000000009e-5 or 3.10000000000000011e-40 < z < 6.2000000000000002e196Initial program 99.8%
Taylor expanded in a around 0 75.2%
+-commutative75.2%
associate-/l*85.2%
Simplified85.2%
Taylor expanded in z around 0 65.3%
mul-1-neg65.3%
associate-/l*71.5%
distribute-lft-neg-in71.5%
Simplified71.5%
Taylor expanded in t around 0 65.3%
mul-1-neg65.3%
*-commutative65.3%
associate-/l*71.6%
distribute-lft-neg-in71.6%
cancel-sign-sub-inv71.6%
Simplified71.6%
if -2.6e-18 < z < 3.10000000000000011e-40Initial program 96.3%
clear-num96.3%
un-div-inv98.0%
Applied egg-rr98.0%
Taylor expanded in z around 0 80.5%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ t z)))))
(if (<= z -9.8e+143)
(+ x y)
(if (<= z -3.35e-6)
t_1
(if (<= z -4e-31)
(- x (* y (/ z a)))
(if (<= z 8.5e-41)
(+ x (/ y (/ a t)))
(if (<= z 6.2e+196) t_1 (+ x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (t / z));
double tmp;
if (z <= -9.8e+143) {
tmp = x + y;
} else if (z <= -3.35e-6) {
tmp = t_1;
} else if (z <= -4e-31) {
tmp = x - (y * (z / a));
} else if (z <= 8.5e-41) {
tmp = x + (y / (a / t));
} else if (z <= 6.2e+196) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y * (t / z))
if (z <= (-9.8d+143)) then
tmp = x + y
else if (z <= (-3.35d-6)) then
tmp = t_1
else if (z <= (-4d-31)) then
tmp = x - (y * (z / a))
else if (z <= 8.5d-41) then
tmp = x + (y / (a / t))
else if (z <= 6.2d+196) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (t / z));
double tmp;
if (z <= -9.8e+143) {
tmp = x + y;
} else if (z <= -3.35e-6) {
tmp = t_1;
} else if (z <= -4e-31) {
tmp = x - (y * (z / a));
} else if (z <= 8.5e-41) {
tmp = x + (y / (a / t));
} else if (z <= 6.2e+196) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (t / z)) tmp = 0 if z <= -9.8e+143: tmp = x + y elif z <= -3.35e-6: tmp = t_1 elif z <= -4e-31: tmp = x - (y * (z / a)) elif z <= 8.5e-41: tmp = x + (y / (a / t)) elif z <= 6.2e+196: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(t / z))) tmp = 0.0 if (z <= -9.8e+143) tmp = Float64(x + y); elseif (z <= -3.35e-6) tmp = t_1; elseif (z <= -4e-31) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (z <= 8.5e-41) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 6.2e+196) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (t / z)); tmp = 0.0; if (z <= -9.8e+143) tmp = x + y; elseif (z <= -3.35e-6) tmp = t_1; elseif (z <= -4e-31) tmp = x - (y * (z / a)); elseif (z <= 8.5e-41) tmp = x + (y / (a / t)); elseif (z <= 6.2e+196) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.8e+143], N[(x + y), $MachinePrecision], If[LessEqual[z, -3.35e-6], t$95$1, If[LessEqual[z, -4e-31], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-41], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+196], t$95$1, N[(x + y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -9.8 \cdot 10^{+143}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -3.35 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-31}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-41}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+196}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -9.79999999999999971e143 or 6.2000000000000002e196 < z Initial program 100.0%
Taylor expanded in z around inf 91.2%
+-commutative91.2%
Simplified91.2%
if -9.79999999999999971e143 < z < -3.35e-6 or 8.4999999999999996e-41 < z < 6.2000000000000002e196Initial program 99.8%
Taylor expanded in a around 0 75.2%
+-commutative75.2%
associate-/l*85.2%
Simplified85.2%
Taylor expanded in z around 0 65.3%
mul-1-neg65.3%
associate-/l*71.5%
distribute-lft-neg-in71.5%
Simplified71.5%
Taylor expanded in t around 0 65.3%
mul-1-neg65.3%
*-commutative65.3%
associate-/l*71.6%
distribute-lft-neg-in71.6%
cancel-sign-sub-inv71.6%
Simplified71.6%
if -3.35e-6 < z < -4e-31Initial program 100.0%
Taylor expanded in t around 0 88.8%
Taylor expanded in z around 0 68.0%
mul-1-neg68.0%
unsub-neg68.0%
associate-/l*68.2%
Simplified68.2%
if -4e-31 < z < 8.4999999999999996e-41Initial program 96.2%
clear-num96.1%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 82.4%
Final simplification81.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9e+143)
(+ x y)
(if (<= z -7.8e-6)
(- x (* y (/ t z)))
(if (<= z -1.45e-31)
(- x (* y (/ z a)))
(if (<= z 1.4e-43)
(+ x (/ y (/ a t)))
(if (<= z 6.2e+196) (- x (/ y (/ z t))) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+143) {
tmp = x + y;
} else if (z <= -7.8e-6) {
tmp = x - (y * (t / z));
} else if (z <= -1.45e-31) {
tmp = x - (y * (z / a));
} else if (z <= 1.4e-43) {
tmp = x + (y / (a / t));
} else if (z <= 6.2e+196) {
tmp = x - (y / (z / t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9d+143)) then
tmp = x + y
else if (z <= (-7.8d-6)) then
tmp = x - (y * (t / z))
else if (z <= (-1.45d-31)) then
tmp = x - (y * (z / a))
else if (z <= 1.4d-43) then
tmp = x + (y / (a / t))
else if (z <= 6.2d+196) then
tmp = x - (y / (z / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+143) {
tmp = x + y;
} else if (z <= -7.8e-6) {
tmp = x - (y * (t / z));
} else if (z <= -1.45e-31) {
tmp = x - (y * (z / a));
} else if (z <= 1.4e-43) {
tmp = x + (y / (a / t));
} else if (z <= 6.2e+196) {
tmp = x - (y / (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+143: tmp = x + y elif z <= -7.8e-6: tmp = x - (y * (t / z)) elif z <= -1.45e-31: tmp = x - (y * (z / a)) elif z <= 1.4e-43: tmp = x + (y / (a / t)) elif z <= 6.2e+196: tmp = x - (y / (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+143) tmp = Float64(x + y); elseif (z <= -7.8e-6) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= -1.45e-31) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (z <= 1.4e-43) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 6.2e+196) tmp = Float64(x - Float64(y / Float64(z / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9e+143) tmp = x + y; elseif (z <= -7.8e-6) tmp = x - (y * (t / z)); elseif (z <= -1.45e-31) tmp = x - (y * (z / a)); elseif (z <= 1.4e-43) tmp = x + (y / (a / t)); elseif (z <= 6.2e+196) tmp = x - (y / (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+143], N[(x + y), $MachinePrecision], If[LessEqual[z, -7.8e-6], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.45e-31], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e-43], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+196], N[(x - N[(y / N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+143}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-6}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-31}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-43}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+196}:\\
\;\;\;\;x - \frac{y}{\frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -8.9999999999999993e143 or 6.2000000000000002e196 < z Initial program 100.0%
Taylor expanded in z around inf 91.2%
+-commutative91.2%
Simplified91.2%
if -8.9999999999999993e143 < z < -7.7999999999999999e-6Initial program 99.9%
Taylor expanded in a around 0 77.3%
+-commutative77.3%
associate-/l*81.7%
Simplified81.7%
Taylor expanded in z around 0 65.3%
mul-1-neg65.3%
associate-/l*69.7%
distribute-lft-neg-in69.7%
Simplified69.7%
Taylor expanded in t around 0 65.3%
mul-1-neg65.3%
*-commutative65.3%
associate-/l*69.7%
distribute-lft-neg-in69.7%
cancel-sign-sub-inv69.7%
Simplified69.7%
if -7.7999999999999999e-6 < z < -1.45e-31Initial program 100.0%
Taylor expanded in t around 0 88.8%
Taylor expanded in z around 0 68.0%
mul-1-neg68.0%
unsub-neg68.0%
associate-/l*68.2%
Simplified68.2%
if -1.45e-31 < z < 1.3999999999999999e-43Initial program 96.2%
clear-num96.1%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 82.4%
if 1.3999999999999999e-43 < z < 6.2000000000000002e196Initial program 99.7%
clear-num98.0%
un-div-inv98.0%
Applied egg-rr98.0%
Taylor expanded in t around inf 76.2%
mul-1-neg76.2%
distribute-neg-frac276.2%
Simplified76.2%
Taylor expanded in z around inf 72.3%
mul-1-neg72.3%
distribute-neg-frac272.3%
Simplified72.3%
Final simplification81.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.5e-32) (not (<= z 2.2e-123))) (+ x (* z (/ y (- z a)))) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.5e-32) || !(z <= 2.2e-123)) {
tmp = x + (z * (y / (z - a)));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-9.5d-32)) .or. (.not. (z <= 2.2d-123))) then
tmp = x + (z * (y / (z - a)))
else
tmp = x + (y / (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.5e-32) || !(z <= 2.2e-123)) {
tmp = x + (z * (y / (z - a)));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.5e-32) or not (z <= 2.2e-123): tmp = x + (z * (y / (z - a))) else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.5e-32) || !(z <= 2.2e-123)) tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.5e-32) || ~((z <= 2.2e-123))) tmp = x + (z * (y / (z - a))); else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.5e-32], N[Not[LessEqual[z, 2.2e-123]], $MachinePrecision]], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-32} \lor \neg \left(z \leq 2.2 \cdot 10^{-123}\right):\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -9.4999999999999999e-32 or 2.20000000000000006e-123 < z Initial program 98.7%
Taylor expanded in t around 0 67.6%
*-commutative67.6%
associate-/l*79.4%
Simplified79.4%
if -9.4999999999999999e-32 < z < 2.20000000000000006e-123Initial program 97.7%
clear-num97.6%
un-div-inv98.6%
Applied egg-rr98.6%
Taylor expanded in z around 0 85.7%
Final simplification81.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8.6e+81) (not (<= t 5.6e+85))) (+ x (* t (/ y (- a z)))) (+ x (* y (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8.6e+81) || !(t <= 5.6e+85)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y * (z / (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.6d+81)) .or. (.not. (t <= 5.6d+85))) then
tmp = x + (t * (y / (a - z)))
else
tmp = x + (y * (z / (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.6e+81) || !(t <= 5.6e+85)) {
tmp = x + (t * (y / (a - z)));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8.6e+81) or not (t <= 5.6e+85): tmp = x + (t * (y / (a - z))) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8.6e+81) || !(t <= 5.6e+85)) tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -8.6e+81) || ~((t <= 5.6e+85))) tmp = x + (t * (y / (a - z))); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8.6e+81], N[Not[LessEqual[t, 5.6e+85]], $MachinePrecision]], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+81} \lor \neg \left(t \leq 5.6 \cdot 10^{+85}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if t < -8.6000000000000003e81 or 5.5999999999999998e85 < t Initial program 96.6%
clear-num96.6%
un-div-inv98.6%
Applied egg-rr98.6%
Taylor expanded in t around inf 87.0%
mul-1-neg87.0%
distribute-neg-frac287.0%
Simplified87.0%
Taylor expanded in x around 0 77.6%
mul-1-neg77.6%
*-commutative77.6%
associate-*r/85.0%
sub-neg85.0%
associate-*r/77.6%
associate-*l/87.0%
*-commutative87.0%
Simplified87.0%
if -8.6000000000000003e81 < t < 5.5999999999999998e85Initial program 99.3%
Taylor expanded in t around 0 79.9%
+-commutative79.9%
associate-/l*92.2%
Simplified92.2%
Final simplification90.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.5e-32) (+ x (/ y (/ (- z a) z))) (if (<= z 3e-123) (+ x (/ y (/ a t))) (+ x (* z (/ y (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e-32) {
tmp = x + (y / ((z - a) / z));
} else if (z <= 3e-123) {
tmp = x + (y / (a / t));
} else {
tmp = x + (z * (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 (z <= (-9.5d-32)) then
tmp = x + (y / ((z - a) / z))
else if (z <= 3d-123) then
tmp = x + (y / (a / t))
else
tmp = x + (z * (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 (z <= -9.5e-32) {
tmp = x + (y / ((z - a) / z));
} else if (z <= 3e-123) {
tmp = x + (y / (a / t));
} else {
tmp = x + (z * (y / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e-32: tmp = x + (y / ((z - a) / z)) elif z <= 3e-123: tmp = x + (y / (a / t)) else: tmp = x + (z * (y / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e-32) tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); elseif (z <= 3e-123) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e-32) tmp = x + (y / ((z - a) / z)); elseif (z <= 3e-123) tmp = x + (y / (a / t)); else tmp = x + (z * (y / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e-32], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e-123], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-32}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-123}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\end{array}
\end{array}
if z < -9.4999999999999999e-32Initial program 99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 87.1%
if -9.4999999999999999e-32 < z < 2.99999999999999984e-123Initial program 97.7%
clear-num97.6%
un-div-inv98.6%
Applied egg-rr98.6%
Taylor expanded in z around 0 85.7%
if 2.99999999999999984e-123 < z Initial program 97.5%
Taylor expanded in t around 0 68.1%
*-commutative68.1%
associate-/l*76.6%
Simplified76.6%
Final simplification83.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.12e-30) (+ x (/ y (/ (- z a) z))) (if (<= z 8.4e-215) (+ x (/ y (/ a t))) (+ x (* y (/ z (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.12e-30) {
tmp = x + (y / ((z - a) / z));
} else if (z <= 8.4e-215) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y * (z / (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 (z <= (-1.12d-30)) then
tmp = x + (y / ((z - a) / z))
else if (z <= 8.4d-215) then
tmp = x + (y / (a / t))
else
tmp = x + (y * (z / (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 (z <= -1.12e-30) {
tmp = x + (y / ((z - a) / z));
} else if (z <= 8.4e-215) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y * (z / (z - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.12e-30: tmp = x + (y / ((z - a) / z)) elif z <= 8.4e-215: tmp = x + (y / (a / t)) else: tmp = x + (y * (z / (z - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.12e-30) tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); elseif (z <= 8.4e-215) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.12e-30) tmp = x + (y / ((z - a) / z)); elseif (z <= 8.4e-215) tmp = x + (y / (a / t)); else tmp = x + (y * (z / (z - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.12e-30], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.4e-215], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-215}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\end{array}
\end{array}
if z < -1.12e-30Initial program 99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 87.1%
if -1.12e-30 < z < 8.4000000000000001e-215Initial program 97.2%
clear-num97.2%
un-div-inv98.3%
Applied egg-rr98.3%
Taylor expanded in z around 0 87.5%
if 8.4000000000000001e-215 < z Initial program 97.9%
Taylor expanded in t around 0 69.9%
+-commutative69.9%
associate-/l*77.4%
Simplified77.4%
Final simplification83.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -5.5e-31) (+ x (/ y (/ (- z a) z))) (if (<= z 1.8e-45) (+ x (/ y (/ a t))) (+ x (* y (/ (- z t) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.5e-31) {
tmp = x + (y / ((z - a) / z));
} else if (z <= 1.8e-45) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y * ((z - 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) :: tmp
if (z <= (-5.5d-31)) then
tmp = x + (y / ((z - a) / z))
else if (z <= 1.8d-45) then
tmp = x + (y / (a / t))
else
tmp = x + (y * ((z - t) / z))
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.5e-31) {
tmp = x + (y / ((z - a) / z));
} else if (z <= 1.8e-45) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y * ((z - t) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.5e-31: tmp = x + (y / ((z - a) / z)) elif z <= 1.8e-45: tmp = x + (y / (a / t)) else: tmp = x + (y * ((z - t) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.5e-31) tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); elseif (z <= 1.8e-45) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.5e-31) tmp = x + (y / ((z - a) / z)); elseif (z <= 1.8e-45) tmp = x + (y / (a / t)); else tmp = x + (y * ((z - t) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e-31], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-45], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-31}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-45}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\
\end{array}
\end{array}
if z < -5.49999999999999958e-31Initial program 99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 87.1%
if -5.49999999999999958e-31 < z < 1.8e-45Initial program 96.2%
clear-num96.1%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 82.4%
if 1.8e-45 < z Initial program 99.8%
Taylor expanded in a around 0 71.9%
+-commutative71.9%
associate-/l*89.8%
Simplified89.8%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.5e-31) (+ x (/ y (/ (- z a) z))) (if (<= z 6.8e-40) (+ x (/ y (/ a t))) (+ x (/ y (/ z (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e-31) {
tmp = x + (y / ((z - a) / z));
} else if (z <= 6.8e-40) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y / (z / (z - 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 (z <= (-9.5d-31)) then
tmp = x + (y / ((z - a) / z))
else if (z <= 6.8d-40) then
tmp = x + (y / (a / t))
else
tmp = x + (y / (z / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e-31) {
tmp = x + (y / ((z - a) / z));
} else if (z <= 6.8e-40) {
tmp = x + (y / (a / t));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e-31: tmp = x + (y / ((z - a) / z)) elif z <= 6.8e-40: tmp = x + (y / (a / t)) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e-31) tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); elseif (z <= 6.8e-40) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e-31) tmp = x + (y / ((z - a) / z)); elseif (z <= 6.8e-40) tmp = x + (y / (a / t)); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e-31], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e-40], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-31}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-40}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if z < -9.5000000000000008e-31Initial program 99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 87.1%
if -9.5000000000000008e-31 < z < 6.79999999999999968e-40Initial program 96.2%
clear-num96.1%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 82.4%
if 6.79999999999999968e-40 < z Initial program 99.8%
Taylor expanded in a around 0 71.9%
+-commutative71.9%
associate-/l*89.8%
Simplified89.8%
clear-num89.8%
un-div-inv89.8%
Applied egg-rr89.8%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.1e+82) (+ x (* y (/ t (- a z)))) (if (<= t 1.95e+85) (+ x (* y (/ z (- z a)))) (+ x (* t (/ y (- a z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.1e+82) {
tmp = x + (y * (t / (a - z)));
} else if (t <= 1.95e+85) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.1d+82)) then
tmp = x + (y * (t / (a - z)))
else if (t <= 1.95d+85) then
tmp = x + (y * (z / (z - a)))
else
tmp = x + (t * (y / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.1e+82) {
tmp = x + (y * (t / (a - z)));
} else if (t <= 1.95e+85) {
tmp = x + (y * (z / (z - a)));
} else {
tmp = x + (t * (y / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.1e+82: tmp = x + (y * (t / (a - z))) elif t <= 1.95e+85: tmp = x + (y * (z / (z - a))) else: tmp = x + (t * (y / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.1e+82) tmp = Float64(x + Float64(y * Float64(t / Float64(a - z)))); elseif (t <= 1.95e+85) tmp = Float64(x + Float64(y * Float64(z / Float64(z - a)))); else tmp = Float64(x + Float64(t * Float64(y / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.1e+82) tmp = x + (y * (t / (a - z))); elseif (t <= 1.95e+85) tmp = x + (y * (z / (z - a))); else tmp = x + (t * (y / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.1e+82], N[(x + N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+85], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+82}:\\
\;\;\;\;x + y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+85}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a - z}\\
\end{array}
\end{array}
if t < -1.1000000000000001e82Initial program 100.0%
Taylor expanded in t around inf 77.8%
associate-*r/77.8%
mul-1-neg77.8%
distribute-lft-neg-out77.8%
*-commutative77.8%
associate-/l*87.6%
Simplified87.6%
if -1.1000000000000001e82 < t < 1.95000000000000017e85Initial program 99.3%
Taylor expanded in t around 0 79.9%
+-commutative79.9%
associate-/l*92.2%
Simplified92.2%
if 1.95000000000000017e85 < t Initial program 94.0%
clear-num93.9%
un-div-inv97.5%
Applied egg-rr97.5%
Taylor expanded in t around inf 86.6%
mul-1-neg86.6%
distribute-neg-frac286.6%
Simplified86.6%
Taylor expanded in x around 0 77.5%
mul-1-neg77.5%
*-commutative77.5%
associate-*r/83.0%
sub-neg83.0%
associate-*r/77.5%
associate-*l/88.6%
*-commutative88.6%
Simplified88.6%
Final simplification90.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.1e+63) (not (<= z 5e-42))) (+ x y) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.1e+63) || !(z <= 5e-42)) {
tmp = x + y;
} else {
tmp = x + (y * (t / 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.1d+63)) .or. (.not. (z <= 5d-42))) then
tmp = x + y
else
tmp = x + (y * (t / 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.1e+63) || !(z <= 5e-42)) {
tmp = x + y;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.1e+63) or not (z <= 5e-42): tmp = x + y else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.1e+63) || !(z <= 5e-42)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.1e+63) || ~((z <= 5e-42))) tmp = x + y; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.1e+63], N[Not[LessEqual[z, 5e-42]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+63} \lor \neg \left(z \leq 5 \cdot 10^{-42}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -3.1000000000000001e63 or 5.00000000000000003e-42 < z Initial program 99.9%
Taylor expanded in z around inf 76.9%
+-commutative76.9%
Simplified76.9%
if -3.1000000000000001e63 < z < 5.00000000000000003e-42Initial program 96.7%
Taylor expanded in z around 0 75.1%
*-commutative75.1%
associate-/l*77.2%
Simplified77.2%
Final simplification77.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+14) (not (<= z 1.55e-41))) (+ x y) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+14) || !(z <= 1.55e-41)) {
tmp = x + y;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.45d+14)) .or. (.not. (z <= 1.55d-41))) then
tmp = x + y
else
tmp = x + (y / (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+14) || !(z <= 1.55e-41)) {
tmp = x + y;
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+14) or not (z <= 1.55e-41): tmp = x + y else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+14) || !(z <= 1.55e-41)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+14) || ~((z <= 1.55e-41))) tmp = x + y; else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+14], N[Not[LessEqual[z, 1.55e-41]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+14} \lor \neg \left(z \leq 1.55 \cdot 10^{-41}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -1.45e14 or 1.55e-41 < z Initial program 99.9%
Taylor expanded in z around inf 75.3%
+-commutative75.3%
Simplified75.3%
if -1.45e14 < z < 1.55e-41Initial program 96.5%
clear-num96.5%
un-div-inv98.1%
Applied egg-rr98.1%
Taylor expanded in z around 0 79.9%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.9e-18) (not (<= z 1.25e-48))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e-18) || !(z <= 1.25e-48)) {
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 ((z <= (-1.9d-18)) .or. (.not. (z <= 1.25d-48))) 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 ((z <= -1.9e-18) || !(z <= 1.25e-48)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e-18) or not (z <= 1.25e-48): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e-18) || !(z <= 1.25e-48)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.9e-18) || ~((z <= 1.25e-48))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e-18], N[Not[LessEqual[z, 1.25e-48]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{-18} \lor \neg \left(z \leq 1.25 \cdot 10^{-48}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.8999999999999999e-18 or 1.25e-48 < z Initial program 99.9%
Taylor expanded in z around inf 74.2%
+-commutative74.2%
Simplified74.2%
if -1.8999999999999999e-18 < z < 1.25e-48Initial program 96.3%
Taylor expanded in x around inf 59.6%
Final simplification68.2%
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Initial program 98.4%
Final simplification98.4%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 98.4%
Taylor expanded in x around inf 52.8%
Final simplification52.8%
(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 2024043
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))