
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
Initial program 89.3%
associate-/l*97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.02e+24)
(+ x y)
(if (<= t -5.4e-8)
(* y (/ z (- a t)))
(if (<= t -3.5e-21)
(+ x y)
(if (<= t 2900000000000.0)
(+ x (* z (/ y a)))
(if (<= t 8.5e+93) (- x (* y (/ z t))) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.02e+24) {
tmp = x + y;
} else if (t <= -5.4e-8) {
tmp = y * (z / (a - t));
} else if (t <= -3.5e-21) {
tmp = x + y;
} else if (t <= 2900000000000.0) {
tmp = x + (z * (y / a));
} else if (t <= 8.5e+93) {
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 (t <= (-1.02d+24)) then
tmp = x + y
else if (t <= (-5.4d-8)) then
tmp = y * (z / (a - t))
else if (t <= (-3.5d-21)) then
tmp = x + y
else if (t <= 2900000000000.0d0) then
tmp = x + (z * (y / a))
else if (t <= 8.5d+93) 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 (t <= -1.02e+24) {
tmp = x + y;
} else if (t <= -5.4e-8) {
tmp = y * (z / (a - t));
} else if (t <= -3.5e-21) {
tmp = x + y;
} else if (t <= 2900000000000.0) {
tmp = x + (z * (y / a));
} else if (t <= 8.5e+93) {
tmp = x - (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.02e+24: tmp = x + y elif t <= -5.4e-8: tmp = y * (z / (a - t)) elif t <= -3.5e-21: tmp = x + y elif t <= 2900000000000.0: tmp = x + (z * (y / a)) elif t <= 8.5e+93: tmp = x - (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.02e+24) tmp = Float64(x + y); elseif (t <= -5.4e-8) tmp = Float64(y * Float64(z / Float64(a - t))); elseif (t <= -3.5e-21) tmp = Float64(x + y); elseif (t <= 2900000000000.0) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (t <= 8.5e+93) 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 (t <= -1.02e+24) tmp = x + y; elseif (t <= -5.4e-8) tmp = y * (z / (a - t)); elseif (t <= -3.5e-21) tmp = x + y; elseif (t <= 2900000000000.0) tmp = x + (z * (y / a)); elseif (t <= 8.5e+93) tmp = x - (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.02e+24], N[(x + y), $MachinePrecision], If[LessEqual[t, -5.4e-8], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.5e-21], N[(x + y), $MachinePrecision], If[LessEqual[t, 2900000000000.0], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e+93], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{+24}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -5.4 \cdot 10^{-8}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-21}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 2900000000000:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+93}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.02000000000000004e24 or -5.40000000000000005e-8 < t < -3.5000000000000003e-21 or 8.5000000000000005e93 < t Initial program 77.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 82.1%
+-commutative82.1%
Simplified82.1%
if -1.02000000000000004e24 < t < -5.40000000000000005e-8Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 77.5%
Taylor expanded in x around 0 70.7%
associate-*r/70.6%
Simplified70.6%
if -3.5000000000000003e-21 < t < 2.9e12Initial program 97.1%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in t around 0 75.5%
+-commutative75.5%
associate-/l*75.7%
Simplified75.7%
associate-/r/77.1%
Applied egg-rr77.1%
if 2.9e12 < t < 8.5000000000000005e93Initial program 82.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 70.9%
Taylor expanded in a around 0 65.0%
mul-1-neg65.0%
unsub-neg65.0%
*-lft-identity65.0%
times-frac76.5%
/-rgt-identity76.5%
Simplified76.5%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.02e+24)
(+ x y)
(if (<= t -5.5e-8)
(/ (* y z) (- a t))
(if (<= t -9e-19)
(+ x y)
(if (<= t 15500000000000.0)
(+ x (* z (/ y a)))
(if (<= t 5.5e+85) (- x (* y (/ z t))) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.02e+24) {
tmp = x + y;
} else if (t <= -5.5e-8) {
tmp = (y * z) / (a - t);
} else if (t <= -9e-19) {
tmp = x + y;
} else if (t <= 15500000000000.0) {
tmp = x + (z * (y / a));
} else if (t <= 5.5e+85) {
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 (t <= (-1.02d+24)) then
tmp = x + y
else if (t <= (-5.5d-8)) then
tmp = (y * z) / (a - t)
else if (t <= (-9d-19)) then
tmp = x + y
else if (t <= 15500000000000.0d0) then
tmp = x + (z * (y / a))
else if (t <= 5.5d+85) 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 (t <= -1.02e+24) {
tmp = x + y;
} else if (t <= -5.5e-8) {
tmp = (y * z) / (a - t);
} else if (t <= -9e-19) {
tmp = x + y;
} else if (t <= 15500000000000.0) {
tmp = x + (z * (y / a));
} else if (t <= 5.5e+85) {
tmp = x - (y * (z / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.02e+24: tmp = x + y elif t <= -5.5e-8: tmp = (y * z) / (a - t) elif t <= -9e-19: tmp = x + y elif t <= 15500000000000.0: tmp = x + (z * (y / a)) elif t <= 5.5e+85: tmp = x - (y * (z / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.02e+24) tmp = Float64(x + y); elseif (t <= -5.5e-8) tmp = Float64(Float64(y * z) / Float64(a - t)); elseif (t <= -9e-19) tmp = Float64(x + y); elseif (t <= 15500000000000.0) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (t <= 5.5e+85) 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 (t <= -1.02e+24) tmp = x + y; elseif (t <= -5.5e-8) tmp = (y * z) / (a - t); elseif (t <= -9e-19) tmp = x + y; elseif (t <= 15500000000000.0) tmp = x + (z * (y / a)); elseif (t <= 5.5e+85) tmp = x - (y * (z / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.02e+24], N[(x + y), $MachinePrecision], If[LessEqual[t, -5.5e-8], N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9e-19], N[(x + y), $MachinePrecision], If[LessEqual[t, 15500000000000.0], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+85], N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{+24}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{y \cdot z}{a - t}\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-19}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 15500000000000:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+85}:\\
\;\;\;\;x - y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -1.02000000000000004e24 or -5.5000000000000003e-8 < t < -9.00000000000000026e-19 or 5.50000000000000008e85 < t Initial program 77.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 82.1%
+-commutative82.1%
Simplified82.1%
if -1.02000000000000004e24 < t < -5.5000000000000003e-8Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 77.5%
Taylor expanded in x around 0 70.7%
if -9.00000000000000026e-19 < t < 1.55e13Initial program 97.1%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in t around 0 75.5%
+-commutative75.5%
associate-/l*75.7%
Simplified75.7%
associate-/r/77.1%
Applied egg-rr77.1%
if 1.55e13 < t < 5.50000000000000008e85Initial program 82.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 70.9%
Taylor expanded in a around 0 65.0%
mul-1-neg65.0%
unsub-neg65.0%
*-lft-identity65.0%
times-frac76.5%
/-rgt-identity76.5%
Simplified76.5%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.02e+24)
(+ x y)
(if (<= t -2.2e-8)
(* y (/ z (- a t)))
(if (or (<= t -1.62e-76) (not (<= t 3.5e+42)))
(+ x y)
(+ x (/ (* y z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.02e+24) {
tmp = x + y;
} else if (t <= -2.2e-8) {
tmp = y * (z / (a - t));
} else if ((t <= -1.62e-76) || !(t <= 3.5e+42)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.02d+24)) then
tmp = x + y
else if (t <= (-2.2d-8)) then
tmp = y * (z / (a - t))
else if ((t <= (-1.62d-76)) .or. (.not. (t <= 3.5d+42))) then
tmp = x + y
else
tmp = x + ((y * z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.02e+24) {
tmp = x + y;
} else if (t <= -2.2e-8) {
tmp = y * (z / (a - t));
} else if ((t <= -1.62e-76) || !(t <= 3.5e+42)) {
tmp = x + y;
} else {
tmp = x + ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.02e+24: tmp = x + y elif t <= -2.2e-8: tmp = y * (z / (a - t)) elif (t <= -1.62e-76) or not (t <= 3.5e+42): tmp = x + y else: tmp = x + ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.02e+24) tmp = Float64(x + y); elseif (t <= -2.2e-8) tmp = Float64(y * Float64(z / Float64(a - t))); elseif ((t <= -1.62e-76) || !(t <= 3.5e+42)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.02e+24) tmp = x + y; elseif (t <= -2.2e-8) tmp = y * (z / (a - t)); elseif ((t <= -1.62e-76) || ~((t <= 3.5e+42))) tmp = x + y; else tmp = x + ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.02e+24], N[(x + y), $MachinePrecision], If[LessEqual[t, -2.2e-8], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.62e-76], N[Not[LessEqual[t, 3.5e+42]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{+24}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{-8}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq -1.62 \cdot 10^{-76} \lor \neg \left(t \leq 3.5 \cdot 10^{+42}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -1.02000000000000004e24 or -2.1999999999999998e-8 < t < -1.62e-76 or 3.50000000000000023e42 < t Initial program 77.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 77.5%
+-commutative77.5%
Simplified77.5%
if -1.02000000000000004e24 < t < -2.1999999999999998e-8Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 77.5%
Taylor expanded in x around 0 70.7%
associate-*r/70.6%
Simplified70.6%
if -1.62e-76 < t < 3.50000000000000023e42Initial program 98.5%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in t around 0 76.4%
Final simplification76.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.02e+24)
(+ x y)
(if (<= t -4.2e-8)
(* y (/ z (- a t)))
(if (or (<= t -2.25e-16) (not (<= t 7e+135)))
(+ x y)
(+ x (* z (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.02e+24) {
tmp = x + y;
} else if (t <= -4.2e-8) {
tmp = y * (z / (a - t));
} else if ((t <= -2.25e-16) || !(t <= 7e+135)) {
tmp = x + y;
} else {
tmp = x + (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 (t <= (-1.02d+24)) then
tmp = x + y
else if (t <= (-4.2d-8)) then
tmp = y * (z / (a - t))
else if ((t <= (-2.25d-16)) .or. (.not. (t <= 7d+135))) then
tmp = x + y
else
tmp = x + (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 (t <= -1.02e+24) {
tmp = x + y;
} else if (t <= -4.2e-8) {
tmp = y * (z / (a - t));
} else if ((t <= -2.25e-16) || !(t <= 7e+135)) {
tmp = x + y;
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.02e+24: tmp = x + y elif t <= -4.2e-8: tmp = y * (z / (a - t)) elif (t <= -2.25e-16) or not (t <= 7e+135): tmp = x + y else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.02e+24) tmp = Float64(x + y); elseif (t <= -4.2e-8) tmp = Float64(y * Float64(z / Float64(a - t))); elseif ((t <= -2.25e-16) || !(t <= 7e+135)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.02e+24) tmp = x + y; elseif (t <= -4.2e-8) tmp = y * (z / (a - t)); elseif ((t <= -2.25e-16) || ~((t <= 7e+135))) tmp = x + y; else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.02e+24], N[(x + y), $MachinePrecision], If[LessEqual[t, -4.2e-8], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.25e-16], N[Not[LessEqual[t, 7e+135]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{+24}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-8}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq -2.25 \cdot 10^{-16} \lor \neg \left(t \leq 7 \cdot 10^{+135}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -1.02000000000000004e24 or -4.19999999999999989e-8 < t < -2.2500000000000001e-16 or 7.0000000000000005e135 < t Initial program 76.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 82.7%
+-commutative82.7%
Simplified82.7%
if -1.02000000000000004e24 < t < -4.19999999999999989e-8Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 77.5%
Taylor expanded in x around 0 70.7%
associate-*r/70.6%
Simplified70.6%
if -2.2500000000000001e-16 < t < 7.0000000000000005e135Initial program 95.2%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in t around 0 72.5%
+-commutative72.5%
associate-/l*73.8%
Simplified73.8%
associate-/r/74.5%
Applied egg-rr74.5%
Final simplification77.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.8e+205)
(+ x (+ y (/ a (/ t y))))
(if (<= t -1.08e-16)
(+ x (/ (- t z) (/ t y)))
(if (<= t 3.6e+237) (+ x (* z (/ y (- a t)))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e+205) {
tmp = x + (y + (a / (t / y)));
} else if (t <= -1.08e-16) {
tmp = x + ((t - z) / (t / y));
} else if (t <= 3.6e+237) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.8d+205)) then
tmp = x + (y + (a / (t / y)))
else if (t <= (-1.08d-16)) then
tmp = x + ((t - z) / (t / y))
else if (t <= 3.6d+237) then
tmp = x + (z * (y / (a - t)))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e+205) {
tmp = x + (y + (a / (t / y)));
} else if (t <= -1.08e-16) {
tmp = x + ((t - z) / (t / y));
} else if (t <= 3.6e+237) {
tmp = x + (z * (y / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.8e+205: tmp = x + (y + (a / (t / y))) elif t <= -1.08e-16: tmp = x + ((t - z) / (t / y)) elif t <= 3.6e+237: tmp = x + (z * (y / (a - t))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.8e+205) tmp = Float64(x + Float64(y + Float64(a / Float64(t / y)))); elseif (t <= -1.08e-16) tmp = Float64(x + Float64(Float64(t - z) / Float64(t / y))); elseif (t <= 3.6e+237) tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.8e+205) tmp = x + (y + (a / (t / y))); elseif (t <= -1.08e-16) tmp = x + ((t - z) / (t / y)); elseif (t <= 3.6e+237) tmp = x + (z * (y / (a - t))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e+205], N[(x + N[(y + N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.08e-16], N[(x + N[(N[(t - z), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+237], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+205}:\\
\;\;\;\;x + \left(y + \frac{a}{\frac{t}{y}}\right)\\
\mathbf{elif}\;t \leq -1.08 \cdot 10^{-16}:\\
\;\;\;\;x + \frac{t - z}{\frac{t}{y}}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+237}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -3.8e205Initial program 61.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 53.3%
+-commutative53.3%
mul-1-neg53.3%
*-commutative53.3%
associate-*l/73.9%
distribute-rgt-neg-out73.9%
Simplified73.9%
Taylor expanded in a around 0 82.7%
associate-/l*87.3%
Simplified87.3%
if -3.8e205 < t < -1.08e-16Initial program 90.1%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.8%
clear-num99.8%
Applied egg-rr99.8%
*-commutative99.8%
frac-2neg99.8%
associate-*r/90.1%
sub-neg90.1%
distribute-neg-in90.1%
add-sqr-sqrt90.0%
sqrt-unprod75.3%
sqr-neg75.3%
sqrt-unprod0.0%
add-sqr-sqrt65.2%
add-sqr-sqrt65.2%
sqrt-unprod58.9%
sqr-neg58.9%
sqrt-unprod0.0%
add-sqr-sqrt90.1%
sub-neg90.1%
distribute-neg-in90.1%
add-sqr-sqrt89.9%
sqrt-unprod81.7%
sqr-neg81.7%
sqrt-unprod0.0%
add-sqr-sqrt57.0%
Applied egg-rr90.1%
*-commutative90.1%
associate-/l*95.8%
+-commutative95.8%
unsub-neg95.8%
+-commutative95.8%
unsub-neg95.8%
Simplified95.8%
Taylor expanded in t around inf 82.1%
if -1.08e-16 < t < 3.60000000000000015e237Initial program 94.9%
associate-/l*96.6%
Simplified96.6%
Taylor expanded in z around inf 80.9%
associate-*l/83.7%
*-commutative83.7%
Simplified83.7%
if 3.60000000000000015e237 < t Initial program 62.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in t around inf 97.1%
+-commutative97.1%
Simplified97.1%
Final simplification84.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a (- z t))))))
(if (<= a -2e+21)
t_1
(if (<= a -5.3e-196)
(+ x (/ (- t z) (/ t y)))
(if (<= a 1.2e-73) (+ x (/ (* y (- t z)) t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / (z - t)));
double tmp;
if (a <= -2e+21) {
tmp = t_1;
} else if (a <= -5.3e-196) {
tmp = x + ((t - z) / (t / y));
} else if (a <= 1.2e-73) {
tmp = x + ((y * (t - z)) / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y / (a / (z - t)))
if (a <= (-2d+21)) then
tmp = t_1
else if (a <= (-5.3d-196)) then
tmp = x + ((t - z) / (t / y))
else if (a <= 1.2d-73) then
tmp = x + ((y * (t - z)) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / (z - t)));
double tmp;
if (a <= -2e+21) {
tmp = t_1;
} else if (a <= -5.3e-196) {
tmp = x + ((t - z) / (t / y));
} else if (a <= 1.2e-73) {
tmp = x + ((y * (t - z)) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / (z - t))) tmp = 0 if a <= -2e+21: tmp = t_1 elif a <= -5.3e-196: tmp = x + ((t - z) / (t / y)) elif a <= 1.2e-73: tmp = x + ((y * (t - z)) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / Float64(z - t)))) tmp = 0.0 if (a <= -2e+21) tmp = t_1; elseif (a <= -5.3e-196) tmp = Float64(x + Float64(Float64(t - z) / Float64(t / y))); elseif (a <= 1.2e-73) tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / (z - t))); tmp = 0.0; if (a <= -2e+21) tmp = t_1; elseif (a <= -5.3e-196) tmp = x + ((t - z) / (t / y)); elseif (a <= 1.2e-73) tmp = x + ((y * (t - z)) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+21], t$95$1, If[LessEqual[a, -5.3e-196], N[(x + N[(N[(t - z), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e-73], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{if}\;a \leq -2 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5.3 \cdot 10^{-196}:\\
\;\;\;\;x + \frac{t - z}{\frac{t}{y}}\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-73}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2e21 or 1.20000000000000003e-73 < a Initial program 89.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around inf 82.4%
+-commutative82.4%
associate-/l*88.5%
Simplified88.5%
if -2e21 < a < -5.3000000000000001e-196Initial program 79.7%
associate-/l*99.9%
Simplified99.9%
clear-num99.8%
associate-/r/97.7%
clear-num97.8%
Applied egg-rr97.8%
*-commutative97.8%
frac-2neg97.8%
associate-*r/79.7%
sub-neg79.7%
distribute-neg-in79.7%
add-sqr-sqrt39.7%
sqrt-unprod59.9%
sqr-neg59.9%
sqrt-unprod30.8%
add-sqr-sqrt63.4%
add-sqr-sqrt32.7%
sqrt-unprod58.3%
sqr-neg58.3%
sqrt-unprod39.9%
add-sqr-sqrt79.7%
sub-neg79.7%
distribute-neg-in79.7%
add-sqr-sqrt39.6%
sqrt-unprod62.5%
sqr-neg62.5%
sqrt-unprod25.5%
add-sqr-sqrt51.8%
Applied egg-rr79.7%
*-commutative79.7%
associate-/l*97.8%
+-commutative97.8%
unsub-neg97.8%
+-commutative97.8%
unsub-neg97.8%
Simplified97.8%
Taylor expanded in t around inf 79.0%
if -5.3000000000000001e-196 < a < 1.20000000000000003e-73Initial program 94.9%
associate-/l*92.3%
Simplified92.3%
clear-num92.1%
associate-/r/92.3%
clear-num92.3%
Applied egg-rr92.3%
*-commutative92.3%
frac-2neg92.3%
associate-*r/94.9%
sub-neg94.9%
distribute-neg-in94.9%
add-sqr-sqrt41.4%
sqrt-unprod64.6%
sqr-neg64.6%
sqrt-unprod39.9%
add-sqr-sqrt65.9%
add-sqr-sqrt26.0%
sqrt-unprod63.4%
sqr-neg63.4%
sqrt-unprod53.2%
add-sqr-sqrt94.9%
sub-neg94.9%
distribute-neg-in94.9%
add-sqr-sqrt41.4%
sqrt-unprod67.1%
sqr-neg67.1%
sqrt-unprod34.4%
add-sqr-sqrt48.7%
Applied egg-rr94.9%
*-commutative94.9%
associate-/l*84.1%
+-commutative84.1%
unsub-neg84.1%
+-commutative84.1%
unsub-neg84.1%
Simplified84.1%
Taylor expanded in a around 0 79.6%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a (- z t))))))
(if (<= a -2e+21)
t_1
(if (<= a 3e-190)
(- x (/ y (/ t (- z t))))
(if (<= a 1.2e-73) (- x (/ (* y t) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / (z - t)));
double tmp;
if (a <= -2e+21) {
tmp = t_1;
} else if (a <= 3e-190) {
tmp = x - (y / (t / (z - t)));
} else if (a <= 1.2e-73) {
tmp = x - ((y * t) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y / (a / (z - t)))
if (a <= (-2d+21)) then
tmp = t_1
else if (a <= 3d-190) then
tmp = x - (y / (t / (z - t)))
else if (a <= 1.2d-73) then
tmp = x - ((y * t) / (a - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / (z - t)));
double tmp;
if (a <= -2e+21) {
tmp = t_1;
} else if (a <= 3e-190) {
tmp = x - (y / (t / (z - t)));
} else if (a <= 1.2e-73) {
tmp = x - ((y * t) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / (z - t))) tmp = 0 if a <= -2e+21: tmp = t_1 elif a <= 3e-190: tmp = x - (y / (t / (z - t))) elif a <= 1.2e-73: tmp = x - ((y * t) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / Float64(z - t)))) tmp = 0.0 if (a <= -2e+21) tmp = t_1; elseif (a <= 3e-190) tmp = Float64(x - Float64(y / Float64(t / Float64(z - t)))); elseif (a <= 1.2e-73) tmp = Float64(x - Float64(Float64(y * t) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / (z - t))); tmp = 0.0; if (a <= -2e+21) tmp = t_1; elseif (a <= 3e-190) tmp = x - (y / (t / (z - t))); elseif (a <= 1.2e-73) tmp = x - ((y * t) / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2e+21], t$95$1, If[LessEqual[a, 3e-190], N[(x - N[(y / N[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e-73], N[(x - N[(N[(y * t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{if}\;a \leq -2 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3 \cdot 10^{-190}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-73}:\\
\;\;\;\;x - \frac{y \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2e21 or 1.20000000000000003e-73 < a Initial program 89.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around inf 82.4%
+-commutative82.4%
associate-/l*88.5%
Simplified88.5%
if -2e21 < a < 2.9999999999999998e-190Initial program 87.6%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in a around 0 75.2%
mul-1-neg75.2%
unsub-neg75.2%
associate-/l*85.5%
Simplified85.5%
if 2.9999999999999998e-190 < a < 1.20000000000000003e-73Initial program 95.7%
associate-/l*91.0%
Simplified91.0%
clear-num90.8%
associate-/r/91.0%
clear-num91.1%
Applied egg-rr91.1%
Taylor expanded in z around 0 81.7%
mul-1-neg81.7%
unsub-neg81.7%
Simplified81.7%
Final simplification86.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.02e+24)
(+ x y)
(if (<= t -5.5e-8)
(/ (* y (- z)) t)
(if (or (<= t -1.5e-152) (not (<= t 3.5e-104))) (+ x y) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.02e+24) {
tmp = x + y;
} else if (t <= -5.5e-8) {
tmp = (y * -z) / t;
} else if ((t <= -1.5e-152) || !(t <= 3.5e-104)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.02d+24)) then
tmp = x + y
else if (t <= (-5.5d-8)) then
tmp = (y * -z) / t
else if ((t <= (-1.5d-152)) .or. (.not. (t <= 3.5d-104))) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.02e+24) {
tmp = x + y;
} else if (t <= -5.5e-8) {
tmp = (y * -z) / t;
} else if ((t <= -1.5e-152) || !(t <= 3.5e-104)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.02e+24: tmp = x + y elif t <= -5.5e-8: tmp = (y * -z) / t elif (t <= -1.5e-152) or not (t <= 3.5e-104): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.02e+24) tmp = Float64(x + y); elseif (t <= -5.5e-8) tmp = Float64(Float64(y * Float64(-z)) / t); elseif ((t <= -1.5e-152) || !(t <= 3.5e-104)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.02e+24) tmp = x + y; elseif (t <= -5.5e-8) tmp = (y * -z) / t; elseif ((t <= -1.5e-152) || ~((t <= 3.5e-104))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.02e+24], N[(x + y), $MachinePrecision], If[LessEqual[t, -5.5e-8], N[(N[(y * (-z)), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[t, -1.5e-152], N[Not[LessEqual[t, 3.5e-104]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{+24}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-152} \lor \neg \left(t \leq 3.5 \cdot 10^{-104}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.02000000000000004e24 or -5.5000000000000003e-8 < t < -1.5e-152 or 3.50000000000000029e-104 < t Initial program 84.9%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in t around inf 68.2%
+-commutative68.2%
Simplified68.2%
if -1.02000000000000004e24 < t < -5.5000000000000003e-8Initial program 100.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 77.5%
Taylor expanded in x around 0 70.7%
Taylor expanded in a around 0 61.7%
associate-*r/61.7%
associate-*r*61.7%
neg-mul-161.7%
*-commutative61.7%
Simplified61.7%
if -1.5e-152 < t < 3.50000000000000029e-104Initial program 97.4%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in x around inf 61.3%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.3e+50) (not (<= t 3.6e+237))) (+ x y) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.3e+50) || !(t <= 3.6e+237)) {
tmp = x + y;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-3.3d+50)) .or. (.not. (t <= 3.6d+237))) then
tmp = x + y
else
tmp = x + (z * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.3e+50) || !(t <= 3.6e+237)) {
tmp = x + y;
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.3e+50) or not (t <= 3.6e+237): tmp = x + y else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.3e+50) || !(t <= 3.6e+237)) tmp = Float64(x + y); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.3e+50) || ~((t <= 3.6e+237))) tmp = x + y; else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.3e+50], N[Not[LessEqual[t, 3.6e+237]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{+50} \lor \neg \left(t \leq 3.6 \cdot 10^{+237}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -3.3e50 or 3.60000000000000015e237 < t Initial program 71.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 82.4%
+-commutative82.4%
Simplified82.4%
if -3.3e50 < t < 3.60000000000000015e237Initial program 95.4%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in z around inf 80.5%
associate-*l/83.1%
*-commutative83.1%
Simplified83.1%
Final simplification82.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.7e-17) (not (<= t 6e+192))) (- x (/ y (/ t (- z t)))) (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.7e-17) || !(t <= 6e+192)) {
tmp = x - (y / (t / (z - t)));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-2.7d-17)) .or. (.not. (t <= 6d+192))) then
tmp = x - (y / (t / (z - t)))
else
tmp = x + (z * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.7e-17) || !(t <= 6e+192)) {
tmp = x - (y / (t / (z - t)));
} else {
tmp = x + (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.7e-17) or not (t <= 6e+192): tmp = x - (y / (t / (z - t))) else: tmp = x + (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.7e-17) || !(t <= 6e+192)) tmp = Float64(x - Float64(y / Float64(t / Float64(z - t)))); else tmp = Float64(x + Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.7e-17) || ~((t <= 6e+192))) tmp = x - (y / (t / (z - t))); else tmp = x + (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.7e-17], N[Not[LessEqual[t, 6e+192]], $MachinePrecision]], N[(x - N[(y / N[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-17} \lor \neg \left(t \leq 6 \cdot 10^{+192}\right):\\
\;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if t < -2.7000000000000001e-17 or 6e192 < t Initial program 79.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 72.9%
mul-1-neg72.9%
unsub-neg72.9%
associate-/l*90.4%
Simplified90.4%
if -2.7000000000000001e-17 < t < 6e192Initial program 94.8%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 81.1%
associate-*l/84.2%
*-commutative84.2%
Simplified84.2%
Final simplification86.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.7e+59) (not (<= z 2.4e+222))) (* y (/ z (- a t))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.7e+59) || !(z <= 2.4e+222)) {
tmp = y * (z / (a - t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.7d+59)) .or. (.not. (z <= 2.4d+222))) then
tmp = y * (z / (a - t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.7e+59) || !(z <= 2.4e+222)) {
tmp = y * (z / (a - t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.7e+59) or not (z <= 2.4e+222): tmp = y * (z / (a - t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.7e+59) || !(z <= 2.4e+222)) tmp = Float64(y * Float64(z / Float64(a - t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.7e+59) || ~((z <= 2.4e+222))) tmp = y * (z / (a - t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.7e+59], N[Not[LessEqual[z, 2.4e+222]], $MachinePrecision]], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+59} \lor \neg \left(z \leq 2.4 \cdot 10^{+222}\right):\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -3.69999999999999997e59 or 2.4000000000000001e222 < z Initial program 85.7%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in z around inf 78.9%
Taylor expanded in x around 0 50.7%
associate-*r/56.2%
Simplified56.2%
if -3.69999999999999997e59 < z < 2.4000000000000001e222Initial program 90.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 67.1%
+-commutative67.1%
Simplified67.1%
Final simplification64.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.45e-152) (not (<= t 2.9e-102))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e-152) || !(t <= 2.9e-102)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.45d-152)) .or. (.not. (t <= 2.9d-102))) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e-152) || !(t <= 2.9e-102)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.45e-152) or not (t <= 2.9e-102): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.45e-152) || !(t <= 2.9e-102)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.45e-152) || ~((t <= 2.9e-102))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.45e-152], N[Not[LessEqual[t, 2.9e-102]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-152} \lor \neg \left(t \leq 2.9 \cdot 10^{-102}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.4500000000000001e-152 or 2.89999999999999986e-102 < t Initial program 85.8%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in t around inf 65.1%
+-commutative65.1%
Simplified65.1%
if -1.4500000000000001e-152 < t < 2.89999999999999986e-102Initial program 97.4%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in x around inf 61.3%
Final simplification63.9%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 89.3%
associate-/l*97.6%
Simplified97.6%
clear-num97.5%
associate-/r/97.2%
clear-num97.3%
Applied egg-rr97.3%
Final simplification97.3%
(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 89.3%
associate-/l*97.6%
Simplified97.6%
Taylor expanded in x around inf 49.6%
Final simplification49.6%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- a t) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / ((a - t) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((a - t) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((a - t) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((a - t) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}
herbie shell --seed 2024031
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))