
(FPCore (x y z t a) :precision binary64 :pre TRUE (+ 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)
use fmin_fmax_functions
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]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = x + (y * ((z - t) / (z - a))) END code
x + y \cdot \frac{z - t}{z - a}
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 :pre TRUE (+ 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)
use fmin_fmax_functions
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]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = x + (y * ((z - t) / (z - a))) END code
x + y \cdot \frac{z - t}{z - a}
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (- z t) (- z a))) (t_2 (fma t (/ y (- a z)) x)))
(if (<= t_1 -5.0)
t_2
(if (<= t_1 0.0005)
(fma y (/ (- t z) a) x)
(if (<= t_1 2.0) (fma y (/ z (- z a)) x) t_2)))))double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double t_2 = fma(t, (y / (a - z)), x);
double tmp;
if (t_1 <= -5.0) {
tmp = t_2;
} else if (t_1 <= 0.0005) {
tmp = fma(y, ((t - z) / a), x);
} else if (t_1 <= 2.0) {
tmp = fma(y, (z / (z - a)), x);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) t_2 = fma(t, Float64(y / Float64(a - z)), x) tmp = 0.0 if (t_1 <= -5.0) tmp = t_2; elseif (t_1 <= 0.0005) tmp = fma(y, Float64(Float64(t - z) / a), x); elseif (t_1 <= 2.0) tmp = fma(y, Float64(z / Float64(z - a)), x); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, -5.0], t$95$2, If[LessEqual[t$95$1, 0.0005], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$2]]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((z - t) / (z - a)) IN LET t_2 = ((t * (y / (a - z))) + x) IN LET tmp_2 = IF (t_1 <= (2)) THEN ((y * (z / (z - a))) + x) ELSE t_2 ENDIF IN LET tmp_1 = IF (t_1 <= (5000000000000000104083408558608425664715468883514404296875e-61)) THEN ((y * ((t - z) / a)) + x) ELSE tmp_2 ENDIF IN LET tmp = IF (t_1 <= (-5)) THEN t_2 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
t_2 := \mathsf{fma}\left(t, \frac{y}{a - z}, x\right)\\
\mathbf{if}\;t\_1 \leq -5:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0.0005:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - z}{a}, x\right)\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{z - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5 or 2 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites76.6%
if -5 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000001e-4Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites60.7%
Applied rewrites59.7%
if 5.0000000000000001e-4 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2Initial program 98.0%
Applied rewrites98.0%
Taylor expanded in t around 0
Applied rewrites71.6%
(FPCore (x y z t a) :precision binary64 :pre TRUE (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(z - t) / Float64(z - a)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = (y * ((z - t) / (z - a))) + x END code
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
Initial program 98.0%
Applied rewrites98.0%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (- z t) (- z a))))
(if (<= t_1 -5e+70)
(* (/ y (- a z)) t)
(if (<= t_1 0.0005)
(fma y (/ (- t z) a) x)
(fma y (/ (- z t) z) x)))))double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= -5e+70) {
tmp = (y / (a - z)) * t;
} else if (t_1 <= 0.0005) {
tmp = fma(y, ((t - z) / a), x);
} else {
tmp = fma(y, ((z - t) / z), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) tmp = 0.0 if (t_1 <= -5e+70) tmp = Float64(Float64(y / Float64(a - z)) * t); elseif (t_1 <= 0.0005) tmp = fma(y, Float64(Float64(t - z) / a), x); else tmp = fma(y, Float64(Float64(z - t) / z), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+70], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$1, 0.0005], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision] + x), $MachinePrecision]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((z - t) / (z - a)) IN LET tmp_1 = IF (t_1 <= (5000000000000000104083408558608425664715468883514404296875e-61)) THEN ((y * ((t - z) / a)) + x) ELSE ((y * ((z - t) / z)) + x) ENDIF IN LET tmp = IF (t_1 <= (-50000000000000002094076278210572897949571693332016914157171385590349824)) THEN ((y / (a - z)) * t) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+70}:\\
\;\;\;\;\frac{y}{a - z} \cdot t\\
\mathbf{elif}\;t\_1 \leq 0.0005:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{z}, x\right)\\
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5.0000000000000002e70Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in t around inf
Applied rewrites26.4%
Applied rewrites28.6%
if -5.0000000000000002e70 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000001e-4Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites60.7%
Applied rewrites59.7%
if 5.0000000000000001e-4 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 98.0%
Applied rewrites98.0%
Taylor expanded in a around 0
Applied rewrites66.9%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (- z t) (- z a))) (t_2 (* (/ y (- a z)) t)))
(if (<= t_1 -5e+74)
t_2
(if (<= t_1 1000000000000.0) (fma y (/ z (- z a)) x) t_2))))double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double t_2 = (y / (a - z)) * t;
double tmp;
if (t_1 <= -5e+74) {
tmp = t_2;
} else if (t_1 <= 1000000000000.0) {
tmp = fma(y, (z / (z - a)), x);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) t_2 = Float64(Float64(y / Float64(a - z)) * t) tmp = 0.0 if (t_1 <= -5e+74) tmp = t_2; elseif (t_1 <= 1000000000000.0) tmp = fma(y, Float64(z / Float64(z - a)), x); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+74], t$95$2, If[LessEqual[t$95$1, 1000000000000.0], N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$2]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((z - t) / (z - a)) IN LET t_2 = ((y / (a - z)) * t) IN LET tmp_1 = IF (t_1 <= (1e12)) THEN ((y * (z / (z - a))) + x) ELSE t_2 ENDIF IN LET tmp = IF (t_1 <= (-499999999999999963269890588240599461754401607599733943631323209890181152768)) THEN t_2 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
t_2 := \frac{y}{a - z} \cdot t\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 1000000000000:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{z - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -4.9999999999999996e74 or 1e12 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in t around inf
Applied rewrites26.4%
Applied rewrites28.6%
if -4.9999999999999996e74 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1e12Initial program 98.0%
Applied rewrites98.0%
Taylor expanded in t around 0
Applied rewrites71.6%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (- z t) (- z a))) (t_2 (* (/ y (- a z)) t)))
(if (<= t_1 -5e+70)
t_2
(if (<= t_1 0.0005)
(fma y (/ t a) x)
(if (<= t_1 1000000000000.0) (+ x y) t_2)))))double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double t_2 = (y / (a - z)) * t;
double tmp;
if (t_1 <= -5e+70) {
tmp = t_2;
} else if (t_1 <= 0.0005) {
tmp = fma(y, (t / a), x);
} else if (t_1 <= 1000000000000.0) {
tmp = x + y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) t_2 = Float64(Float64(y / Float64(a - z)) * t) tmp = 0.0 if (t_1 <= -5e+70) tmp = t_2; elseif (t_1 <= 0.0005) tmp = fma(y, Float64(t / a), x); elseif (t_1 <= 1000000000000.0) tmp = Float64(x + y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+70], t$95$2, If[LessEqual[t$95$1, 0.0005], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 1000000000000.0], N[(x + y), $MachinePrecision], t$95$2]]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((z - t) / (z - a)) IN LET t_2 = ((y / (a - z)) * t) IN LET tmp_2 = IF (t_1 <= (1e12)) THEN (x + y) ELSE t_2 ENDIF IN LET tmp_1 = IF (t_1 <= (5000000000000000104083408558608425664715468883514404296875e-61)) THEN ((y * (t / a)) + x) ELSE tmp_2 ENDIF IN LET tmp = IF (t_1 <= (-50000000000000002094076278210572897949571693332016914157171385590349824)) THEN t_2 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
t_2 := \frac{y}{a - z} \cdot t\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+70}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0.0005:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{elif}\;t\_1 \leq 1000000000000:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5.0000000000000002e70 or 1e12 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in t around inf
Applied rewrites26.4%
Applied rewrites28.6%
if -5.0000000000000002e70 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000001e-4Initial program 98.0%
Applied rewrites98.0%
Taylor expanded in z around 0
Applied rewrites62.0%
if 5.0000000000000001e-4 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1e12Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (- z t) (- z a))))
(if (<= t_1 -5e+70)
(/ (* t y) (- a z))
(if (<= t_1 0.0005)
(fma y (/ t a) x)
(if (<= t_1 1000000000000.0) (+ x y) (* y (/ t (- a z))))))))double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= -5e+70) {
tmp = (t * y) / (a - z);
} else if (t_1 <= 0.0005) {
tmp = fma(y, (t / a), x);
} else if (t_1 <= 1000000000000.0) {
tmp = x + y;
} else {
tmp = y * (t / (a - z));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) tmp = 0.0 if (t_1 <= -5e+70) tmp = Float64(Float64(t * y) / Float64(a - z)); elseif (t_1 <= 0.0005) tmp = fma(y, Float64(t / a), x); elseif (t_1 <= 1000000000000.0) tmp = Float64(x + y); else tmp = Float64(y * Float64(t / Float64(a - z))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+70], N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0005], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 1000000000000.0], N[(x + y), $MachinePrecision], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((z - t) / (z - a)) IN LET tmp_2 = IF (t_1 <= (1e12)) THEN (x + y) ELSE (y * (t / (a - z))) ENDIF IN LET tmp_1 = IF (t_1 <= (5000000000000000104083408558608425664715468883514404296875e-61)) THEN ((y * (t / a)) + x) ELSE tmp_2 ENDIF IN LET tmp = IF (t_1 <= (-50000000000000002094076278210572897949571693332016914157171385590349824)) THEN ((t * y) / (a - z)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+70}:\\
\;\;\;\;\frac{t \cdot y}{a - z}\\
\mathbf{elif}\;t\_1 \leq 0.0005:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{elif}\;t\_1 \leq 1000000000000:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5.0000000000000002e70Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in t around inf
Applied rewrites26.4%
if -5.0000000000000002e70 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000001e-4Initial program 98.0%
Applied rewrites98.0%
Taylor expanded in z around 0
Applied rewrites62.0%
if 5.0000000000000001e-4 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1e12Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
if 1e12 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in t around inf
Applied rewrites26.4%
Applied rewrites28.8%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (- z t) (- z a))) (t_2 (* y (/ t (- a z)))))
(if (<= t_1 -5e+70)
t_2
(if (<= t_1 0.0005)
(fma y (/ t a) x)
(if (<= t_1 1000000000000.0) (+ x y) t_2)))))double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double t_2 = y * (t / (a - z));
double tmp;
if (t_1 <= -5e+70) {
tmp = t_2;
} else if (t_1 <= 0.0005) {
tmp = fma(y, (t / a), x);
} else if (t_1 <= 1000000000000.0) {
tmp = x + y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) t_2 = Float64(y * Float64(t / Float64(a - z))) tmp = 0.0 if (t_1 <= -5e+70) tmp = t_2; elseif (t_1 <= 0.0005) tmp = fma(y, Float64(t / a), x); elseif (t_1 <= 1000000000000.0) tmp = Float64(x + y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+70], t$95$2, If[LessEqual[t$95$1, 0.0005], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 1000000000000.0], N[(x + y), $MachinePrecision], t$95$2]]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((z - t) / (z - a)) IN LET t_2 = (y * (t / (a - z))) IN LET tmp_2 = IF (t_1 <= (1e12)) THEN (x + y) ELSE t_2 ENDIF IN LET tmp_1 = IF (t_1 <= (5000000000000000104083408558608425664715468883514404296875e-61)) THEN ((y * (t / a)) + x) ELSE tmp_2 ENDIF IN LET tmp = IF (t_1 <= (-50000000000000002094076278210572897949571693332016914157171385590349824)) THEN t_2 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
t_2 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+70}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 0.0005:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{elif}\;t\_1 \leq 1000000000000:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -5.0000000000000002e70 or 1e12 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in t around inf
Applied rewrites26.4%
Applied rewrites28.8%
if -5.0000000000000002e70 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000001e-4Initial program 98.0%
Applied rewrites98.0%
Taylor expanded in z around 0
Applied rewrites62.0%
if 5.0000000000000001e-4 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1e12Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (- z t) (- z a))))
(if (<= t_1 -2e+82)
(* y (/ (- z t) z))
(if (<= t_1 0.0005)
(fma y (/ t a) x)
(if (<= t_1 2.0) (+ x y) (fma t (/ y a) x))))))double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= -2e+82) {
tmp = y * ((z - t) / z);
} else if (t_1 <= 0.0005) {
tmp = fma(y, (t / a), x);
} else if (t_1 <= 2.0) {
tmp = x + y;
} else {
tmp = fma(t, (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) tmp = 0.0 if (t_1 <= -2e+82) tmp = Float64(y * Float64(Float64(z - t) / z)); elseif (t_1 <= 0.0005) tmp = fma(y, Float64(t / a), x); elseif (t_1 <= 2.0) tmp = Float64(x + y); else tmp = fma(t, Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+82], N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0005], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x + y), $MachinePrecision], N[(t * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((z - t) / (z - a)) IN LET tmp_2 = IF (t_1 <= (2)) THEN (x + y) ELSE ((t * (y / a)) + x) ENDIF IN LET tmp_1 = IF (t_1 <= (5000000000000000104083408558608425664715468883514404296875e-61)) THEN ((y * (t / a)) + x) ELSE tmp_2 ENDIF IN LET tmp = IF (t_1 <= (-19999999999999999268135931261773148422054286450547135587360727686854173003085774848)) THEN (y * ((z - t) / z)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+82}:\\
\;\;\;\;y \cdot \frac{z - t}{z}\\
\mathbf{elif}\;t\_1 \leq 0.0005:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y}{a}, x\right)\\
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -1.9999999999999999e82Initial program 98.0%
Taylor expanded in x around 0
Applied rewrites39.6%
Applied rewrites49.5%
Taylor expanded in a around 0
Applied rewrites31.4%
if -1.9999999999999999e82 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000001e-4Initial program 98.0%
Applied rewrites98.0%
Taylor expanded in z around 0
Applied rewrites62.0%
if 5.0000000000000001e-4 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
if 2 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites76.6%
Taylor expanded in z around 0
Applied rewrites62.1%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (- z t) (- z a))))
(if (<= t_1 -2e+82)
(/ (* y (- z t)) z)
(if (<= t_1 0.0005)
(fma y (/ t a) x)
(if (<= t_1 2.0) (+ x y) (fma t (/ y a) x))))))double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double tmp;
if (t_1 <= -2e+82) {
tmp = (y * (z - t)) / z;
} else if (t_1 <= 0.0005) {
tmp = fma(y, (t / a), x);
} else if (t_1 <= 2.0) {
tmp = x + y;
} else {
tmp = fma(t, (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) tmp = 0.0 if (t_1 <= -2e+82) tmp = Float64(Float64(y * Float64(z - t)) / z); elseif (t_1 <= 0.0005) tmp = fma(y, Float64(t / a), x); elseif (t_1 <= 2.0) tmp = Float64(x + y); else tmp = fma(t, Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+82], N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 0.0005], N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 2.0], N[(x + y), $MachinePrecision], N[(t * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((z - t) / (z - a)) IN LET tmp_2 = IF (t_1 <= (2)) THEN (x + y) ELSE ((t * (y / a)) + x) ENDIF IN LET tmp_1 = IF (t_1 <= (5000000000000000104083408558608425664715468883514404296875e-61)) THEN ((y * (t / a)) + x) ELSE tmp_2 ENDIF IN LET tmp = IF (t_1 <= (-19999999999999999268135931261773148422054286450547135587360727686854173003085774848)) THEN ((y * (z - t)) / z) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+82}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{z}\\
\mathbf{elif}\;t\_1 \leq 0.0005:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y}{a}, x\right)\\
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < -1.9999999999999999e82Initial program 98.0%
Taylor expanded in x around 0
Applied rewrites39.6%
Applied rewrites49.5%
Taylor expanded in a around 0
Applied rewrites24.2%
if -1.9999999999999999e82 < (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000001e-4Initial program 98.0%
Applied rewrites98.0%
Taylor expanded in z around 0
Applied rewrites62.0%
if 5.0000000000000001e-4 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
if 2 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites76.6%
Taylor expanded in z around 0
Applied rewrites62.1%
(FPCore (x y z t a) :precision binary64 :pre TRUE (let* ((t_1 (/ (- z t) (- z a))) (t_2 (fma t (/ y a) x))) (if (<= t_1 0.0005) t_2 (if (<= t_1 2.0) (+ x y) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double t_2 = fma(t, (y / a), x);
double tmp;
if (t_1 <= 0.0005) {
tmp = t_2;
} else if (t_1 <= 2.0) {
tmp = x + y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) t_2 = fma(t, Float64(y / a), x) tmp = 0.0 if (t_1 <= 0.0005) tmp = t_2; elseif (t_1 <= 2.0) tmp = Float64(x + y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0005], t$95$2, If[LessEqual[t$95$1, 2.0], N[(x + y), $MachinePrecision], t$95$2]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((z - t) / (z - a)) IN LET t_2 = ((t * (y / a)) + x) IN LET tmp_1 = IF (t_1 <= (2)) THEN (x + y) ELSE t_2 ENDIF IN LET tmp = IF (t_1 <= (5000000000000000104083408558608425664715468883514404296875e-61)) THEN t_2 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
t_2 := \mathsf{fma}\left(t, \frac{y}{a}, x\right)\\
\mathbf{if}\;t\_1 \leq 0.0005:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000001e-4 or 2 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in z around 0
Applied rewrites76.6%
Taylor expanded in z around 0
Applied rewrites62.1%
if 5.0000000000000001e-4 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
(FPCore (x y z t a) :precision binary64 :pre TRUE (let* ((t_1 (/ (- z t) (- z a))) (t_2 (fma y (/ t a) x))) (if (<= t_1 0.0005) t_2 (if (<= t_1 2.0) (+ x y) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) / (z - a);
double t_2 = fma(y, (t / a), x);
double tmp;
if (t_1 <= 0.0005) {
tmp = t_2;
} else if (t_1 <= 2.0) {
tmp = x + y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) / Float64(z - a)) t_2 = fma(y, Float64(t / a), x) tmp = 0.0 if (t_1 <= 0.0005) tmp = t_2; elseif (t_1 <= 2.0) tmp = Float64(x + y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0005], t$95$2, If[LessEqual[t$95$1, 2.0], N[(x + y), $MachinePrecision], t$95$2]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = ((z - t) / (z - a)) IN LET t_2 = ((y * (t / a)) + x) IN LET tmp_1 = IF (t_1 <= (2)) THEN (x + y) ELSE t_2 ENDIF IN LET tmp = IF (t_1 <= (5000000000000000104083408558608425664715468883514404296875e-61)) THEN t_2 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{z - t}{z - a}\\
t_2 := \mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
\mathbf{if}\;t\_1 \leq 0.0005:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if (/.f64 (-.f64 z t) (-.f64 z a)) < 5.0000000000000001e-4 or 2 < (/.f64 (-.f64 z t) (-.f64 z a)) Initial program 98.0%
Applied rewrites98.0%
Taylor expanded in z around 0
Applied rewrites62.0%
if 5.0000000000000001e-4 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
(FPCore (x y z t a)
:precision binary64
:pre TRUE
(let* ((t_1 (* y (/ (- z t) (- z a)))))
(if (<= t_1 -1e+295)
(/ (* t y) a)
(if (<= t_1 1e+269) (+ x y) (* y (/ t a))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (z - a));
double tmp;
if (t_1 <= -1e+295) {
tmp = (t * y) / a;
} else if (t_1 <= 1e+269) {
tmp = x + y;
} else {
tmp = y * (t / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / (z - a))
if (t_1 <= (-1d+295)) then
tmp = (t * y) / a
else if (t_1 <= 1d+269) then
tmp = x + y
else
tmp = y * (t / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (z - a));
double tmp;
if (t_1 <= -1e+295) {
tmp = (t * y) / a;
} else if (t_1 <= 1e+269) {
tmp = x + y;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (z - a)) tmp = 0 if t_1 <= -1e+295: tmp = (t * y) / a elif t_1 <= 1e+269: tmp = x + y else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(z - a))) tmp = 0.0 if (t_1 <= -1e+295) tmp = Float64(Float64(t * y) / a); elseif (t_1 <= 1e+269) tmp = Float64(x + y); else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (z - a)); tmp = 0.0; if (t_1 <= -1e+295) tmp = (t * y) / a; elseif (t_1 <= 1e+269) tmp = x + y; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+295], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$1, 1e+269], N[(x + y), $MachinePrecision], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = (y * ((z - t) / (z - a))) IN LET tmp_1 = IF (t_1 <= (100000000000000004675381888545612798918960543133041028684136487274401643939455589461036825818030333693907688813404495028932616818466243033147431327741697981638738927986463793558699752023835231102266007829372867138519293326106230343475263802678137754874196788463928344576)) THEN (x + y) ELSE (y * (t / a)) ENDIF IN LET tmp = IF (t_1 <= (-9999999999999999813486777206230041577815560719820581330098483720446847883279500839884297726782854580737362697004022581572770293687044935910015528960168049498887207223940204684198896264456339658487887951484580004902758521100414464490983962613190835886243290260424727924570510530141380583845003264)) THEN ((t * y) / a) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{z - a}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+295}:\\
\;\;\;\;\frac{t \cdot y}{a}\\
\mathbf{elif}\;t\_1 \leq 10^{+269}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
if (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a))) < -9.9999999999999998e294Initial program 98.0%
Applied rewrites95.8%
Taylor expanded in t around inf
Applied rewrites26.4%
Taylor expanded in z around 0
Applied rewrites18.7%
if -9.9999999999999998e294 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a))) < 1e269Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
if 1e269 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a))) Initial program 98.0%
Taylor expanded in x around 0
Applied rewrites39.6%
Applied rewrites49.5%
Taylor expanded in z around 0
Applied rewrites20.3%
(FPCore (x y z t a) :precision binary64 :pre TRUE (let* ((t_1 (* y (/ t a))) (t_2 (* y (/ (- z t) (- z a))))) (if (<= t_2 -1e+295) t_1 (if (<= t_2 1e+269) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / a);
double t_2 = y * ((z - t) / (z - a));
double tmp;
if (t_2 <= -1e+295) {
tmp = t_1;
} else if (t_2 <= 1e+269) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
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 * (t / a)
t_2 = y * ((z - t) / (z - a))
if (t_2 <= (-1d+295)) then
tmp = t_1
else if (t_2 <= 1d+269) then
tmp = x + y
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 * (t / a);
double t_2 = y * ((z - t) / (z - a));
double tmp;
if (t_2 <= -1e+295) {
tmp = t_1;
} else if (t_2 <= 1e+269) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / a) t_2 = y * ((z - t) / (z - a)) tmp = 0 if t_2 <= -1e+295: tmp = t_1 elif t_2 <= 1e+269: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / a)) t_2 = Float64(y * Float64(Float64(z - t) / Float64(z - a))) tmp = 0.0 if (t_2 <= -1e+295) tmp = t_1; elseif (t_2 <= 1e+269) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / a); t_2 = y * ((z - t) / (z - a)); tmp = 0.0; if (t_2 <= -1e+295) tmp = t_1; elseif (t_2 <= 1e+269) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+295], t$95$1, If[LessEqual[t$95$2, 1e+269], N[(x + y), $MachinePrecision], t$95$1]]]]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = LET t_1 = (y * (t / a)) IN LET t_2 = (y * ((z - t) / (z - a))) IN LET tmp_1 = IF (t_2 <= (100000000000000004675381888545612798918960543133041028684136487274401643939455589461036825818030333693907688813404495028932616818466243033147431327741697981638738927986463793558699752023835231102266007829372867138519293326106230343475263802678137754874196788463928344576)) THEN (x + y) ELSE t_1 ENDIF IN LET tmp = IF (t_2 <= (-9999999999999999813486777206230041577815560719820581330098483720446847883279500839884297726782854580737362697004022581572770293687044935910015528960168049498887207223940204684198896264456339658487887951484580004902758521100414464490983962613190835886243290260424727924570510530141380583845003264)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := y \cdot \frac{t}{a}\\
t_2 := y \cdot \frac{z - t}{z - a}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+295}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+269}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a))) < -9.9999999999999998e294 or 1e269 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a))) Initial program 98.0%
Taylor expanded in x around 0
Applied rewrites39.6%
Applied rewrites49.5%
Taylor expanded in z around 0
Applied rewrites20.3%
if -9.9999999999999998e294 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a))) < 1e269Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
(FPCore (x y z t a) :precision binary64 :pre TRUE (+ x y))
double code(double x, double y, double z, double t, double a) {
return x + y;
}
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x + y;
}
def code(x, y, z, t, a): return x + y
function code(x, y, z, t, a) return Float64(x + y) end
function tmp = code(x, y, z, t, a) tmp = x + y; end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = x + y END code
x + y
Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
(FPCore (x y z t a) :precision binary64 :pre TRUE y)
double code(double x, double y, double z, double t, double a) {
return y;
}
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = y
end function
public static double code(double x, double y, double z, double t, double a) {
return y;
}
def code(x, y, z, t, a): return y
function code(x, y, z, t, a) return y end
function tmp = code(x, y, z, t, a) tmp = y; end
code[x_, y_, z_, t_, a_] := y
f(x, y, z, t, a): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf], a in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t, a: real): real = y END code
y
Initial program 98.0%
Taylor expanded in z around inf
Applied rewrites60.8%
Taylor expanded in x around 0
Applied rewrites19.0%
herbie shell --seed 2026092
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
(+ x (* y (/ (- z t) (- z a)))))