
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (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) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (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) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z a) t))))
(t_2 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -4e-200)
t_2
(if (<= t_2 1e-245)
t_1
(if (<= t_2 4e+291)
t_2
(*
x
(+ (* y (/ (+ (- (/ z (- t a)) (/ t (- t a))) 1.0) x)) 1.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - a) / t));
double t_2 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -4e-200) {
tmp = t_2;
} else if (t_2 <= 1e-245) {
tmp = t_1;
} else if (t_2 <= 4e+291) {
tmp = t_2;
} else {
tmp = x * ((y * ((((z / (t - a)) - (t / (t - a))) + 1.0) / x)) + 1.0);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - a) / t));
double t_2 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -4e-200) {
tmp = t_2;
} else if (t_2 <= 1e-245) {
tmp = t_1;
} else if (t_2 <= 4e+291) {
tmp = t_2;
} else {
tmp = x * ((y * ((((z / (t - a)) - (t / (t - a))) + 1.0) / x)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - a) / t)) t_2 = (x + y) + ((y * (z - t)) / (t - a)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -4e-200: tmp = t_2 elif t_2 <= 1e-245: tmp = t_1 elif t_2 <= 4e+291: tmp = t_2 else: tmp = x * ((y * ((((z / (t - a)) - (t / (t - a))) + 1.0) / x)) + 1.0) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - a) / t))) t_2 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -4e-200) tmp = t_2; elseif (t_2 <= 1e-245) tmp = t_1; elseif (t_2 <= 4e+291) tmp = t_2; else tmp = Float64(x * Float64(Float64(y * Float64(Float64(Float64(Float64(z / Float64(t - a)) - Float64(t / Float64(t - a))) + 1.0) / x)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - a) / t)); t_2 = (x + y) + ((y * (z - t)) / (t - a)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -4e-200) tmp = t_2; elseif (t_2 <= 1e-245) tmp = t_1; elseif (t_2 <= 4e+291) tmp = t_2; else tmp = x * ((y * ((((z / (t - a)) - (t / (t - a))) + 1.0) / x)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-200], t$95$2, If[LessEqual[t$95$2, 1e-245], t$95$1, If[LessEqual[t$95$2, 4e+291], t$95$2, N[(x * N[(N[(y * N[(N[(N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] - N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - a}{t}\\
t_2 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 10^{-245}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+291}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \frac{\left(\frac{z}{t - a} - \frac{t}{t - a}\right) + 1}{x} + 1\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or -3.9999999999999999e-200 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999993e-246Initial program 24.4%
Taylor expanded in y around -inf 54.8%
mul-1-neg54.8%
distribute-rgt-neg-in54.8%
mul-1-neg54.8%
distribute-neg-frac254.8%
mul-1-neg54.8%
unsub-neg54.8%
Simplified54.8%
Taylor expanded in t around inf 77.2%
mul-1-neg77.2%
unsub-neg77.2%
associate-/l*90.3%
mul-1-neg90.3%
sub-neg90.3%
Simplified90.3%
if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -3.9999999999999999e-200 or 9.9999999999999993e-246 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 3.9999999999999998e291Initial program 98.2%
if 3.9999999999999998e291 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 61.0%
Taylor expanded in y around -inf 91.9%
mul-1-neg91.9%
distribute-rgt-neg-in91.9%
mul-1-neg91.9%
distribute-neg-frac291.9%
mul-1-neg91.9%
unsub-neg91.9%
Simplified91.9%
Taylor expanded in x around inf 94.5%
associate-/l*94.6%
associate--l+94.6%
Simplified94.6%
Final simplification96.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z a) t))))
(t_2 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -4e-200)
t_2
(if (<= t_2 1e-245)
t_1
(if (<= t_2 5e+304)
t_2
(* y (+ (+ (/ (- z t) (- t a)) 1.0) (/ x y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - a) / t));
double t_2 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -4e-200) {
tmp = t_2;
} else if (t_2 <= 1e-245) {
tmp = t_1;
} else if (t_2 <= 5e+304) {
tmp = t_2;
} else {
tmp = y * ((((z - t) / (t - a)) + 1.0) + (x / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - a) / t));
double t_2 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -4e-200) {
tmp = t_2;
} else if (t_2 <= 1e-245) {
tmp = t_1;
} else if (t_2 <= 5e+304) {
tmp = t_2;
} else {
tmp = y * ((((z - t) / (t - a)) + 1.0) + (x / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - a) / t)) t_2 = (x + y) + ((y * (z - t)) / (t - a)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -4e-200: tmp = t_2 elif t_2 <= 1e-245: tmp = t_1 elif t_2 <= 5e+304: tmp = t_2 else: tmp = y * ((((z - t) / (t - a)) + 1.0) + (x / y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - a) / t))) t_2 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -4e-200) tmp = t_2; elseif (t_2 <= 1e-245) tmp = t_1; elseif (t_2 <= 5e+304) tmp = t_2; else tmp = Float64(y * Float64(Float64(Float64(Float64(z - t) / Float64(t - a)) + 1.0) + Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - a) / t)); t_2 = (x + y) + ((y * (z - t)) / (t - a)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -4e-200) tmp = t_2; elseif (t_2 <= 1e-245) tmp = t_1; elseif (t_2 <= 5e+304) tmp = t_2; else tmp = y * ((((z - t) / (t - a)) + 1.0) + (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-200], t$95$2, If[LessEqual[t$95$2, 1e-245], t$95$1, If[LessEqual[t$95$2, 5e+304], t$95$2, N[(y * N[(N[(N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - a}{t}\\
t_2 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 10^{-245}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(\frac{z - t}{t - a} + 1\right) + \frac{x}{y}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or -3.9999999999999999e-200 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999993e-246Initial program 24.4%
Taylor expanded in y around -inf 54.8%
mul-1-neg54.8%
distribute-rgt-neg-in54.8%
mul-1-neg54.8%
distribute-neg-frac254.8%
mul-1-neg54.8%
unsub-neg54.8%
Simplified54.8%
Taylor expanded in t around inf 77.2%
mul-1-neg77.2%
unsub-neg77.2%
associate-/l*90.3%
mul-1-neg90.3%
sub-neg90.3%
Simplified90.3%
if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -3.9999999999999999e-200 or 9.9999999999999993e-246 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 4.9999999999999997e304Initial program 98.2%
if 4.9999999999999997e304 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 57.3%
Taylor expanded in y around -inf 94.0%
mul-1-neg94.0%
distribute-rgt-neg-in94.0%
mul-1-neg94.0%
distribute-neg-frac294.0%
mul-1-neg94.0%
unsub-neg94.0%
Simplified94.0%
Final simplification96.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z a) t))))
(t_2 (+ (+ x y) (/ (* y (- z t)) (- t a)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -4e-200)
t_2
(if (<= t_2 1e-245) t_1 (+ (+ x y) (* (- z t) (/ y (- t a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - a) / t));
double t_2 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -4e-200) {
tmp = t_2;
} else if (t_2 <= 1e-245) {
tmp = t_1;
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - a) / t));
double t_2 = (x + y) + ((y * (z - t)) / (t - a));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -4e-200) {
tmp = t_2;
} else if (t_2 <= 1e-245) {
tmp = t_1;
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - a) / t)) t_2 = (x + y) + ((y * (z - t)) / (t - a)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -4e-200: tmp = t_2 elif t_2 <= 1e-245: tmp = t_1 else: tmp = (x + y) + ((z - t) * (y / (t - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - a) / t))) t_2 = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -4e-200) tmp = t_2; elseif (t_2 <= 1e-245) tmp = t_1; else tmp = Float64(Float64(x + y) + Float64(Float64(z - t) * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - a) / t)); t_2 = (x + y) + ((y * (z - t)) / (t - a)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -4e-200) tmp = t_2; elseif (t_2 <= 1e-245) tmp = t_1; else tmp = (x + y) + ((z - t) * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-200], t$95$2, If[LessEqual[t$95$2, 1e-245], t$95$1, N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - a}{t}\\
t_2 := \left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-200}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 10^{-245}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or -3.9999999999999999e-200 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999993e-246Initial program 24.4%
Taylor expanded in y around -inf 54.8%
mul-1-neg54.8%
distribute-rgt-neg-in54.8%
mul-1-neg54.8%
distribute-neg-frac254.8%
mul-1-neg54.8%
unsub-neg54.8%
Simplified54.8%
Taylor expanded in t around inf 77.2%
mul-1-neg77.2%
unsub-neg77.2%
associate-/l*90.3%
mul-1-neg90.3%
sub-neg90.3%
Simplified90.3%
if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -3.9999999999999999e-200Initial program 96.6%
if 9.9999999999999993e-246 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 88.8%
associate-/l*93.5%
*-commutative93.5%
Applied egg-rr93.5%
Final simplification93.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6e+51)
(+ x (- (* y (/ z t)) (* a (/ y t))))
(if (<= t 5.5e-123)
(+ (+ x y) (/ (* y (- z t)) (- t a)))
(if (<= t 1.4e+178)
(* x (+ (/ (* y (+ (- 1.0 (/ t (- t a))) (/ z (- t a)))) x) 1.0))
(+ x (* y (/ (- z a) t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+51) {
tmp = x + ((y * (z / t)) - (a * (y / t)));
} else if (t <= 5.5e-123) {
tmp = (x + y) + ((y * (z - t)) / (t - a));
} else if (t <= 1.4e+178) {
tmp = x * (((y * ((1.0 - (t / (t - a))) + (z / (t - a)))) / x) + 1.0);
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-6d+51)) then
tmp = x + ((y * (z / t)) - (a * (y / t)))
else if (t <= 5.5d-123) then
tmp = (x + y) + ((y * (z - t)) / (t - a))
else if (t <= 1.4d+178) then
tmp = x * (((y * ((1.0d0 - (t / (t - a))) + (z / (t - a)))) / x) + 1.0d0)
else
tmp = x + (y * ((z - a) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+51) {
tmp = x + ((y * (z / t)) - (a * (y / t)));
} else if (t <= 5.5e-123) {
tmp = (x + y) + ((y * (z - t)) / (t - a));
} else if (t <= 1.4e+178) {
tmp = x * (((y * ((1.0 - (t / (t - a))) + (z / (t - a)))) / x) + 1.0);
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6e+51: tmp = x + ((y * (z / t)) - (a * (y / t))) elif t <= 5.5e-123: tmp = (x + y) + ((y * (z - t)) / (t - a)) elif t <= 1.4e+178: tmp = x * (((y * ((1.0 - (t / (t - a))) + (z / (t - a)))) / x) + 1.0) else: tmp = x + (y * ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6e+51) tmp = Float64(x + Float64(Float64(y * Float64(z / t)) - Float64(a * Float64(y / t)))); elseif (t <= 5.5e-123) tmp = Float64(Float64(x + y) + Float64(Float64(y * Float64(z - t)) / Float64(t - a))); elseif (t <= 1.4e+178) tmp = Float64(x * Float64(Float64(Float64(y * Float64(Float64(1.0 - Float64(t / Float64(t - a))) + Float64(z / Float64(t - a)))) / x) + 1.0)); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6e+51) tmp = x + ((y * (z / t)) - (a * (y / t))); elseif (t <= 5.5e-123) tmp = (x + y) + ((y * (z - t)) / (t - a)); elseif (t <= 1.4e+178) tmp = x * (((y * ((1.0 - (t / (t - a))) + (z / (t - a)))) / x) + 1.0); else tmp = x + (y * ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6e+51], N[(x + N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-123], N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e+178], N[(x * N[(N[(N[(y * N[(N[(1.0 - N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+51}:\\
\;\;\;\;x + \left(y \cdot \frac{z}{t} - a \cdot \frac{y}{t}\right)\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-123}:\\
\;\;\;\;\left(x + y\right) + \frac{y \cdot \left(z - t\right)}{t - a}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+178}:\\
\;\;\;\;x \cdot \left(\frac{y \cdot \left(\left(1 - \frac{t}{t - a}\right) + \frac{z}{t - a}\right)}{x} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if t < -6e51Initial program 55.6%
sub-neg55.6%
+-commutative55.6%
distribute-frac-neg55.6%
distribute-rgt-neg-out55.6%
associate-/l*66.2%
fma-define66.2%
distribute-frac-neg66.2%
distribute-neg-frac266.2%
sub-neg66.2%
distribute-neg-in66.2%
remove-double-neg66.2%
+-commutative66.2%
sub-neg66.2%
Simplified66.2%
Taylor expanded in t around inf 66.6%
associate--l+66.6%
associate-+r+79.0%
distribute-rgt1-in79.0%
metadata-eval79.0%
mul0-lft79.0%
associate-/l*85.2%
associate-/l*89.5%
Simplified89.5%
if -6e51 < t < 5.5e-123Initial program 96.1%
if 5.5e-123 < t < 1.39999999999999997e178Initial program 74.4%
Taylor expanded in y around -inf 75.9%
mul-1-neg75.9%
distribute-rgt-neg-in75.9%
mul-1-neg75.9%
distribute-neg-frac275.9%
mul-1-neg75.9%
unsub-neg75.9%
Simplified75.9%
Taylor expanded in x around inf 94.9%
if 1.39999999999999997e178 < t Initial program 43.9%
Taylor expanded in y around -inf 66.2%
mul-1-neg66.2%
distribute-rgt-neg-in66.2%
mul-1-neg66.2%
distribute-neg-frac266.2%
mul-1-neg66.2%
unsub-neg66.2%
Simplified66.2%
Taylor expanded in t around inf 88.0%
mul-1-neg88.0%
unsub-neg88.0%
associate-/l*96.3%
mul-1-neg96.3%
sub-neg96.3%
Simplified96.3%
Final simplification94.6%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -1.35e+152)
(and (not (<= z -2.4e+123))
(or (<= z -2.9e+82) (not (<= z 9.6e+176)))))
(* y (/ z (- t a)))
(+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e+152) || (!(z <= -2.4e+123) && ((z <= -2.9e+82) || !(z <= 9.6e+176)))) {
tmp = y * (z / (t - a));
} 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 <= (-1.35d+152)) .or. (.not. (z <= (-2.4d+123))) .and. (z <= (-2.9d+82)) .or. (.not. (z <= 9.6d+176))) then
tmp = y * (z / (t - a))
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 <= -1.35e+152) || (!(z <= -2.4e+123) && ((z <= -2.9e+82) || !(z <= 9.6e+176)))) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.35e+152) or (not (z <= -2.4e+123) and ((z <= -2.9e+82) or not (z <= 9.6e+176))): tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.35e+152) || (!(z <= -2.4e+123) && ((z <= -2.9e+82) || !(z <= 9.6e+176)))) tmp = Float64(y * Float64(z / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.35e+152) || (~((z <= -2.4e+123)) && ((z <= -2.9e+82) || ~((z <= 9.6e+176))))) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.35e+152], And[N[Not[LessEqual[z, -2.4e+123]], $MachinePrecision], Or[LessEqual[z, -2.9e+82], N[Not[LessEqual[z, 9.6e+176]], $MachinePrecision]]]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+152} \lor \neg \left(z \leq -2.4 \cdot 10^{+123}\right) \land \left(z \leq -2.9 \cdot 10^{+82} \lor \neg \left(z \leq 9.6 \cdot 10^{+176}\right)\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.35000000000000007e152 or -2.39999999999999989e123 < z < -2.9000000000000001e82 or 9.6000000000000005e176 < z Initial program 80.3%
sub-neg80.3%
+-commutative80.3%
distribute-frac-neg80.3%
distribute-rgt-neg-out80.3%
associate-/l*87.6%
fma-define87.7%
distribute-frac-neg87.7%
distribute-neg-frac287.7%
sub-neg87.7%
distribute-neg-in87.7%
remove-double-neg87.7%
+-commutative87.7%
sub-neg87.7%
Simplified87.7%
Taylor expanded in z around inf 61.7%
associate-/l*69.6%
Simplified69.6%
if -1.35000000000000007e152 < z < -2.39999999999999989e123 or -2.9000000000000001e82 < z < 9.6000000000000005e176Initial program 77.8%
Taylor expanded in a around inf 67.7%
+-commutative67.7%
Simplified67.7%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.2e+51) (not (<= t 5.6e+32))) (+ x (* y (/ (- z a) t))) (+ (+ x y) (* y (/ z (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.2e+51) || !(t <= 5.6e+32)) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = (x + y) + (y * (z / (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 ((t <= (-3.2d+51)) .or. (.not. (t <= 5.6d+32))) then
tmp = x + (y * ((z - a) / t))
else
tmp = (x + y) + (y * (z / (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 ((t <= -3.2e+51) || !(t <= 5.6e+32)) {
tmp = x + (y * ((z - a) / t));
} else {
tmp = (x + y) + (y * (z / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.2e+51) or not (t <= 5.6e+32): tmp = x + (y * ((z - a) / t)) else: tmp = (x + y) + (y * (z / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.2e+51) || !(t <= 5.6e+32)) tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); else tmp = Float64(Float64(x + y) + Float64(y * Float64(z / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.2e+51) || ~((t <= 5.6e+32))) tmp = x + (y * ((z - a) / t)); else tmp = (x + y) + (y * (z / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.2e+51], N[Not[LessEqual[t, 5.6e+32]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+51} \lor \neg \left(t \leq 5.6 \cdot 10^{+32}\right):\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if t < -3.2000000000000002e51 or 5.6e32 < t Initial program 54.9%
Taylor expanded in y around -inf 66.1%
mul-1-neg66.1%
distribute-rgt-neg-in66.1%
mul-1-neg66.1%
distribute-neg-frac266.1%
mul-1-neg66.1%
unsub-neg66.1%
Simplified66.1%
Taylor expanded in t around inf 79.9%
mul-1-neg79.9%
unsub-neg79.9%
associate-/l*89.7%
mul-1-neg89.7%
sub-neg89.7%
Simplified89.7%
if -3.2000000000000002e51 < t < 5.6e32Initial program 93.0%
Taylor expanded in z around inf 91.6%
associate-/l*93.5%
Simplified93.5%
Final simplification92.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.05e-132) (+ x y) (if (<= a 7.8e-261) x (if (<= a 9.5e-120) (* z (/ y t)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.05e-132) {
tmp = x + y;
} else if (a <= 7.8e-261) {
tmp = x;
} else if (a <= 9.5e-120) {
tmp = z * (y / 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 (a <= (-2.05d-132)) then
tmp = x + y
else if (a <= 7.8d-261) then
tmp = x
else if (a <= 9.5d-120) then
tmp = z * (y / 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 (a <= -2.05e-132) {
tmp = x + y;
} else if (a <= 7.8e-261) {
tmp = x;
} else if (a <= 9.5e-120) {
tmp = z * (y / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.05e-132: tmp = x + y elif a <= 7.8e-261: tmp = x elif a <= 9.5e-120: tmp = z * (y / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.05e-132) tmp = Float64(x + y); elseif (a <= 7.8e-261) tmp = x; elseif (a <= 9.5e-120) tmp = Float64(z * Float64(y / t)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.05e-132) tmp = x + y; elseif (a <= 7.8e-261) tmp = x; elseif (a <= 9.5e-120) tmp = z * (y / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.05e-132], N[(x + y), $MachinePrecision], If[LessEqual[a, 7.8e-261], x, If[LessEqual[a, 9.5e-120], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{-132}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-261}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-120}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.05000000000000003e-132 or 9.49999999999999937e-120 < a Initial program 82.5%
Taylor expanded in a around inf 69.8%
+-commutative69.8%
Simplified69.8%
if -2.05000000000000003e-132 < a < 7.80000000000000035e-261Initial program 66.4%
Taylor expanded in x around inf 54.5%
if 7.80000000000000035e-261 < a < 9.49999999999999937e-120Initial program 76.7%
sub-neg76.7%
+-commutative76.7%
distribute-frac-neg76.7%
distribute-rgt-neg-out76.7%
associate-/l*76.8%
fma-define76.7%
distribute-frac-neg76.7%
distribute-neg-frac276.7%
sub-neg76.7%
distribute-neg-in76.7%
remove-double-neg76.7%
+-commutative76.7%
sub-neg76.7%
Simplified76.7%
Taylor expanded in z around inf 61.5%
Taylor expanded in t around inf 51.7%
associate-/l*57.7%
Simplified57.7%
Taylor expanded in y around 0 51.7%
*-commutative51.7%
associate-/l*57.8%
Simplified57.8%
Final simplification65.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.8e-132) (+ x y) (if (<= a 2.5e-262) x (if (<= a 5.4e-120) (* y (/ z t)) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e-132) {
tmp = x + y;
} else if (a <= 2.5e-262) {
tmp = x;
} else if (a <= 5.4e-120) {
tmp = 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 (a <= (-3.8d-132)) then
tmp = x + y
else if (a <= 2.5d-262) then
tmp = x
else if (a <= 5.4d-120) then
tmp = 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 (a <= -3.8e-132) {
tmp = x + y;
} else if (a <= 2.5e-262) {
tmp = x;
} else if (a <= 5.4e-120) {
tmp = y * (z / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e-132: tmp = x + y elif a <= 2.5e-262: tmp = x elif a <= 5.4e-120: tmp = y * (z / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e-132) tmp = Float64(x + y); elseif (a <= 2.5e-262) tmp = x; elseif (a <= 5.4e-120) tmp = 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 (a <= -3.8e-132) tmp = x + y; elseif (a <= 2.5e-262) tmp = x; elseif (a <= 5.4e-120) tmp = y * (z / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e-132], N[(x + y), $MachinePrecision], If[LessEqual[a, 2.5e-262], x, If[LessEqual[a, 5.4e-120], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-132}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-262}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-120}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -3.7999999999999997e-132 or 5.3999999999999997e-120 < a Initial program 82.5%
Taylor expanded in a around inf 69.8%
+-commutative69.8%
Simplified69.8%
if -3.7999999999999997e-132 < a < 2.49999999999999996e-262Initial program 66.4%
Taylor expanded in x around inf 54.5%
if 2.49999999999999996e-262 < a < 5.3999999999999997e-120Initial program 76.7%
sub-neg76.7%
+-commutative76.7%
distribute-frac-neg76.7%
distribute-rgt-neg-out76.7%
associate-/l*76.8%
fma-define76.7%
distribute-frac-neg76.7%
distribute-neg-frac276.7%
sub-neg76.7%
distribute-neg-in76.7%
remove-double-neg76.7%
+-commutative76.7%
sub-neg76.7%
Simplified76.7%
Taylor expanded in z around inf 61.5%
Taylor expanded in t around inf 51.7%
associate-/l*57.7%
Simplified57.7%
Final simplification65.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -0.00013) (not (<= a 1.7e+42))) (- (+ x y) (* y (/ z a))) (+ x (* y (/ (- z a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.00013) || !(a <= 1.7e+42)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-0.00013d0)) .or. (.not. (a <= 1.7d+42))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x + (y * ((z - a) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.00013) || !(a <= 1.7e+42)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -0.00013) or not (a <= 1.7e+42): tmp = (x + y) - (y * (z / a)) else: tmp = x + (y * ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -0.00013) || !(a <= 1.7e+42)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -0.00013) || ~((a <= 1.7e+42))) tmp = (x + y) - (y * (z / a)); else tmp = x + (y * ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -0.00013], N[Not[LessEqual[a, 1.7e+42]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.00013 \lor \neg \left(a \leq 1.7 \cdot 10^{+42}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if a < -1.29999999999999989e-4 or 1.69999999999999988e42 < a Initial program 85.7%
Taylor expanded in t around 0 85.1%
+-commutative85.1%
associate-/l*89.9%
Simplified89.9%
if -1.29999999999999989e-4 < a < 1.69999999999999988e42Initial program 73.4%
Taylor expanded in y around -inf 76.2%
mul-1-neg76.2%
distribute-rgt-neg-in76.2%
mul-1-neg76.2%
distribute-neg-frac276.2%
mul-1-neg76.2%
unsub-neg76.2%
Simplified76.2%
Taylor expanded in t around inf 80.8%
mul-1-neg80.8%
unsub-neg80.8%
associate-/l*84.3%
mul-1-neg84.3%
sub-neg84.3%
Simplified84.3%
Final simplification86.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -0.012) (not (<= a 5e+61))) (+ x y) (+ x (* y (/ (- z a) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.012) || !(a <= 5e+61)) {
tmp = x + y;
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-0.012d0)) .or. (.not. (a <= 5d+61))) then
tmp = x + y
else
tmp = x + (y * ((z - a) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -0.012) || !(a <= 5e+61)) {
tmp = x + y;
} else {
tmp = x + (y * ((z - a) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -0.012) or not (a <= 5e+61): tmp = x + y else: tmp = x + (y * ((z - a) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -0.012) || !(a <= 5e+61)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(Float64(z - a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -0.012) || ~((a <= 5e+61))) tmp = x + y; else tmp = x + (y * ((z - a) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -0.012], N[Not[LessEqual[a, 5e+61]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.012 \lor \neg \left(a \leq 5 \cdot 10^{+61}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if a < -0.012 or 5.00000000000000018e61 < a Initial program 85.4%
Taylor expanded in a around inf 81.5%
+-commutative81.5%
Simplified81.5%
if -0.012 < a < 5.00000000000000018e61Initial program 73.8%
Taylor expanded in y around -inf 76.5%
mul-1-neg76.5%
distribute-rgt-neg-in76.5%
mul-1-neg76.5%
distribute-neg-frac276.5%
mul-1-neg76.5%
unsub-neg76.5%
Simplified76.5%
Taylor expanded in t around inf 80.5%
mul-1-neg80.5%
unsub-neg80.5%
associate-/l*83.9%
mul-1-neg83.9%
sub-neg83.9%
Simplified83.9%
Final simplification83.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1850.0) (not (<= a 1.8e+59))) (+ x y) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1850.0) || !(a <= 1.8e+59)) {
tmp = x + y;
} else {
tmp = x + (y * (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 ((a <= (-1850.0d0)) .or. (.not. (a <= 1.8d+59))) then
tmp = x + y
else
tmp = x + (y * (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 ((a <= -1850.0) || !(a <= 1.8e+59)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1850.0) or not (a <= 1.8e+59): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1850.0) || !(a <= 1.8e+59)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1850.0) || ~((a <= 1.8e+59))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1850.0], N[Not[LessEqual[a, 1.8e+59]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1850 \lor \neg \left(a \leq 1.8 \cdot 10^{+59}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -1850 or 1.7999999999999999e59 < a Initial program 85.4%
Taylor expanded in a around inf 81.5%
+-commutative81.5%
Simplified81.5%
if -1850 < a < 1.7999999999999999e59Initial program 73.8%
Taylor expanded in y around -inf 76.5%
mul-1-neg76.5%
distribute-rgt-neg-in76.5%
mul-1-neg76.5%
distribute-neg-frac276.5%
mul-1-neg76.5%
unsub-neg76.5%
Simplified76.5%
Taylor expanded in a around 0 71.0%
associate-*r*71.0%
mul-1-neg71.0%
mul-1-neg71.0%
unsub-neg71.0%
associate-*r/71.0%
neg-mul-171.0%
Simplified71.0%
Taylor expanded in y around 0 76.8%
associate-/l*80.2%
Simplified80.2%
Final simplification80.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.8e-132) (not (<= a 1.7e+42))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.8e-132) || !(a <= 1.7e+42)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3.8d-132)) .or. (.not. (a <= 1.7d+42))) then
tmp = x + y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.8e-132) || !(a <= 1.7e+42)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.8e-132) or not (a <= 1.7e+42): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.8e-132) || !(a <= 1.7e+42)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.8e-132) || ~((a <= 1.7e+42))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.8e-132], N[Not[LessEqual[a, 1.7e+42]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-132} \lor \neg \left(a \leq 1.7 \cdot 10^{+42}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.7999999999999997e-132 or 1.69999999999999988e42 < a Initial program 84.2%
Taylor expanded in a around inf 72.3%
+-commutative72.3%
Simplified72.3%
if -3.7999999999999997e-132 < a < 1.69999999999999988e42Initial program 72.3%
Taylor expanded in x around inf 52.4%
Final simplification62.6%
(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 78.4%
Taylor expanded in x around inf 50.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * 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) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * 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 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024119
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))