
(FPCore (x y z t) :precision binary64 :pre TRUE (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = (x + (((y * z) - x) / ((t * z) - x))) / (x + (1)) END code
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 :pre TRUE (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))
double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
}
def code(x, y, z, t): return (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0)
function code(x, y, z, t) return Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) end
function tmp = code(x, y, z, t) tmp = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); end
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = (x + (((y * z) - x) / ((t * z) - x))) / (x + (1)) END code
\frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (- (* t z) x)))
(if (<= (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0)) INFINITY)
(/ (fma y (/ z t_1) (+ (/ x (- x (* t z))) x)) (+ x 1.0))
(/ (+ x (/ y t)) (+ x 1.0)))))double code(double x, double y, double z, double t) {
double t_1 = (t * z) - x;
double tmp;
if (((x + (((y * z) - x) / t_1)) / (x + 1.0)) <= ((double) INFINITY)) {
tmp = fma(y, (z / t_1), ((x / (x - (t * z))) + x)) / (x + 1.0);
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(t * z) - x) tmp = 0.0 if (Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) <= Inf) tmp = Float64(fma(y, Float64(z / t_1), Float64(Float64(x / Float64(x - Float64(t * z))) + x)) / Float64(x + 1.0)); else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y * N[(z / t$95$1), $MachinePrecision] + N[(N[(x / N[(x - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_1 := t \cdot z - x\\
\mathbf{if}\;\frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t\_1}, \frac{x}{x - t \cdot z} + x\right)}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < +inf.0Initial program 89.1%
Applied rewrites96.7%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites70.4%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (- (* t z) x))
(t_2 (* y (/ z (* (+ 1.0 x) t_1))))
(t_3 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_3 -4000000.0)
t_2
(if (<= t_3 0.4)
(/ (- x (/ (+ (- y) (/ x z)) t)) (+ x 1.0))
(if (<= t_3 2.0)
(/ (- x (/ x t_1)) (+ x 1.0))
(if (<= t_3 INFINITY) t_2 (/ (+ x (/ y t)) (+ x 1.0))))))))double code(double x, double y, double z, double t) {
double t_1 = (t * z) - x;
double t_2 = y * (z / ((1.0 + x) * t_1));
double t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_3 <= -4000000.0) {
tmp = t_2;
} else if (t_3 <= 0.4) {
tmp = (x - ((-y + (x / z)) / t)) / (x + 1.0);
} else if (t_3 <= 2.0) {
tmp = (x - (x / t_1)) / (x + 1.0);
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (t * z) - x;
double t_2 = y * (z / ((1.0 + x) * t_1));
double t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_3 <= -4000000.0) {
tmp = t_2;
} else if (t_3 <= 0.4) {
tmp = (x - ((-y + (x / z)) / t)) / (x + 1.0);
} else if (t_3 <= 2.0) {
tmp = (x - (x / t_1)) / (x + 1.0);
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (t * z) - x t_2 = y * (z / ((1.0 + x) * t_1)) t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_3 <= -4000000.0: tmp = t_2 elif t_3 <= 0.4: tmp = (x - ((-y + (x / z)) / t)) / (x + 1.0) elif t_3 <= 2.0: tmp = (x - (x / t_1)) / (x + 1.0) elif t_3 <= math.inf: tmp = t_2 else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t * z) - x) t_2 = Float64(y * Float64(z / Float64(Float64(1.0 + x) * t_1))) t_3 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_3 <= -4000000.0) tmp = t_2; elseif (t_3 <= 0.4) tmp = Float64(Float64(x - Float64(Float64(Float64(-y) + Float64(x / z)) / t)) / Float64(x + 1.0)); elseif (t_3 <= 2.0) tmp = Float64(Float64(x - Float64(x / t_1)) / Float64(x + 1.0)); elseif (t_3 <= Inf) tmp = t_2; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t * z) - x; t_2 = y * (z / ((1.0 + x) * t_1)); t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_3 <= -4000000.0) tmp = t_2; elseif (t_3 <= 0.4) tmp = (x - ((-y + (x / z)) / t)) / (x + 1.0); elseif (t_3 <= 2.0) tmp = (x - (x / t_1)) / (x + 1.0); elseif (t_3 <= Inf) tmp = t_2; else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(N[(1.0 + x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -4000000.0], t$95$2, If[LessEqual[t$95$3, 0.4], N[(N[(x - N[(N[((-y) + N[(x / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2.0], N[(N[(x - N[(x / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$2, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_1 := t \cdot z - x\\
t_2 := y \cdot \frac{z}{\left(1 + x\right) \cdot t\_1}\\
t_3 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
\mathbf{if}\;t\_3 \leq -4000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 0.4:\\
\;\;\;\;\frac{x - \frac{\left(-y\right) + \frac{x}{z}}{t}}{x + 1}\\
\mathbf{elif}\;t\_3 \leq 2:\\
\;\;\;\;\frac{x - \frac{x}{t\_1}}{x + 1}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -4e6 or 2 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < +inf.0Initial program 89.1%
Taylor expanded in y around inf
Applied rewrites28.8%
Applied rewrites32.1%
if -4e6 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.40000000000000002Initial program 89.1%
Taylor expanded in t around -inf
Applied rewrites57.2%
Applied rewrites57.2%
if 0.40000000000000002 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 89.1%
Taylor expanded in y around 0
Applied rewrites66.5%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites70.4%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (- (* t z) x))
(t_2 (* y (/ z (* (+ 1.0 x) t_1))))
(t_3 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_3 -4000000.0)
t_2
(if (<= t_3 0.4)
(/ (- x (/ (- (/ x z) y) t)) 1.0)
(if (<= t_3 2.0)
(/ (- x (/ x t_1)) (+ x 1.0))
(if (<= t_3 INFINITY) t_2 (/ (+ x (/ y t)) (+ x 1.0))))))))double code(double x, double y, double z, double t) {
double t_1 = (t * z) - x;
double t_2 = y * (z / ((1.0 + x) * t_1));
double t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_3 <= -4000000.0) {
tmp = t_2;
} else if (t_3 <= 0.4) {
tmp = (x - (((x / z) - y) / t)) / 1.0;
} else if (t_3 <= 2.0) {
tmp = (x - (x / t_1)) / (x + 1.0);
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (t * z) - x;
double t_2 = y * (z / ((1.0 + x) * t_1));
double t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_3 <= -4000000.0) {
tmp = t_2;
} else if (t_3 <= 0.4) {
tmp = (x - (((x / z) - y) / t)) / 1.0;
} else if (t_3 <= 2.0) {
tmp = (x - (x / t_1)) / (x + 1.0);
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (t * z) - x t_2 = y * (z / ((1.0 + x) * t_1)) t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_3 <= -4000000.0: tmp = t_2 elif t_3 <= 0.4: tmp = (x - (((x / z) - y) / t)) / 1.0 elif t_3 <= 2.0: tmp = (x - (x / t_1)) / (x + 1.0) elif t_3 <= math.inf: tmp = t_2 else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t * z) - x) t_2 = Float64(y * Float64(z / Float64(Float64(1.0 + x) * t_1))) t_3 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_3 <= -4000000.0) tmp = t_2; elseif (t_3 <= 0.4) tmp = Float64(Float64(x - Float64(Float64(Float64(x / z) - y) / t)) / 1.0); elseif (t_3 <= 2.0) tmp = Float64(Float64(x - Float64(x / t_1)) / Float64(x + 1.0)); elseif (t_3 <= Inf) tmp = t_2; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t * z) - x; t_2 = y * (z / ((1.0 + x) * t_1)); t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_3 <= -4000000.0) tmp = t_2; elseif (t_3 <= 0.4) tmp = (x - (((x / z) - y) / t)) / 1.0; elseif (t_3 <= 2.0) tmp = (x - (x / t_1)) / (x + 1.0); elseif (t_3 <= Inf) tmp = t_2; else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(N[(1.0 + x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -4000000.0], t$95$2, If[LessEqual[t$95$3, 0.4], N[(N[(x - N[(N[(N[(x / z), $MachinePrecision] - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision], If[LessEqual[t$95$3, 2.0], N[(N[(x - N[(x / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$2, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_1 := t \cdot z - x\\
t_2 := y \cdot \frac{z}{\left(1 + x\right) \cdot t\_1}\\
t_3 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
\mathbf{if}\;t\_3 \leq -4000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 0.4:\\
\;\;\;\;\frac{x - \frac{\frac{x}{z} - y}{t}}{1}\\
\mathbf{elif}\;t\_3 \leq 2:\\
\;\;\;\;\frac{x - \frac{x}{t\_1}}{x + 1}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -4e6 or 2 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < +inf.0Initial program 89.1%
Taylor expanded in y around inf
Applied rewrites28.8%
Applied rewrites32.1%
if -4e6 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.40000000000000002Initial program 89.1%
Taylor expanded in t around -inf
Applied rewrites57.2%
Applied rewrites57.2%
Taylor expanded in x around 0
Applied rewrites36.8%
Taylor expanded in x around 0
Applied rewrites36.8%
if 0.40000000000000002 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 89.1%
Taylor expanded in y around 0
Applied rewrites66.5%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites70.4%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (- (* t z) x))
(t_2 (* y (/ z (* (+ 1.0 x) t_1))))
(t_3 (/ (+ x (/ (- (* y z) x) t_1)) (+ x 1.0))))
(if (<= t_3 -4000000.0)
t_2
(if (<= t_3 0.4)
(/ (- x (/ (- (/ x z) y) t)) 1.0)
(if (<= t_3 2.0)
(/ (- 0.0 -1.0) 1.0)
(if (<= t_3 INFINITY) t_2 (/ (+ x (/ y t)) (+ x 1.0))))))))double code(double x, double y, double z, double t) {
double t_1 = (t * z) - x;
double t_2 = y * (z / ((1.0 + x) * t_1));
double t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_3 <= -4000000.0) {
tmp = t_2;
} else if (t_3 <= 0.4) {
tmp = (x - (((x / z) - y) / t)) / 1.0;
} else if (t_3 <= 2.0) {
tmp = (0.0 - -1.0) / 1.0;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (t * z) - x;
double t_2 = y * (z / ((1.0 + x) * t_1));
double t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0);
double tmp;
if (t_3 <= -4000000.0) {
tmp = t_2;
} else if (t_3 <= 0.4) {
tmp = (x - (((x / z) - y) / t)) / 1.0;
} else if (t_3 <= 2.0) {
tmp = (0.0 - -1.0) / 1.0;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = (x + (y / t)) / (x + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = (t * z) - x t_2 = y * (z / ((1.0 + x) * t_1)) t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0) tmp = 0 if t_3 <= -4000000.0: tmp = t_2 elif t_3 <= 0.4: tmp = (x - (((x / z) - y) / t)) / 1.0 elif t_3 <= 2.0: tmp = (0.0 - -1.0) / 1.0 elif t_3 <= math.inf: tmp = t_2 else: tmp = (x + (y / t)) / (x + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t * z) - x) t_2 = Float64(y * Float64(z / Float64(Float64(1.0 + x) * t_1))) t_3 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / t_1)) / Float64(x + 1.0)) tmp = 0.0 if (t_3 <= -4000000.0) tmp = t_2; elseif (t_3 <= 0.4) tmp = Float64(Float64(x - Float64(Float64(Float64(x / z) - y) / t)) / 1.0); elseif (t_3 <= 2.0) tmp = Float64(Float64(0.0 - -1.0) / 1.0); elseif (t_3 <= Inf) tmp = t_2; else tmp = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t * z) - x; t_2 = y * (z / ((1.0 + x) * t_1)); t_3 = (x + (((y * z) - x) / t_1)) / (x + 1.0); tmp = 0.0; if (t_3 <= -4000000.0) tmp = t_2; elseif (t_3 <= 0.4) tmp = (x - (((x / z) - y) / t)) / 1.0; elseif (t_3 <= 2.0) tmp = (0.0 - -1.0) / 1.0; elseif (t_3 <= Inf) tmp = t_2; else tmp = (x + (y / t)) / (x + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(N[(1.0 + x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -4000000.0], t$95$2, If[LessEqual[t$95$3, 0.4], N[(N[(x - N[(N[(N[(x / z), $MachinePrecision] - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision], If[LessEqual[t$95$3, 2.0], N[(N[(0.0 - -1.0), $MachinePrecision] / 1.0), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$2, N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_1 := t \cdot z - x\\
t_2 := y \cdot \frac{z}{\left(1 + x\right) \cdot t\_1}\\
t_3 := \frac{x + \frac{y \cdot z - x}{t\_1}}{x + 1}\\
\mathbf{if}\;t\_3 \leq -4000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 0.4:\\
\;\;\;\;\frac{x - \frac{\frac{x}{z} - y}{t}}{1}\\
\mathbf{elif}\;t\_3 \leq 2:\\
\;\;\;\;\frac{0 - -1}{1}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{t}}{x + 1}\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -4e6 or 2 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < +inf.0Initial program 89.1%
Taylor expanded in y around inf
Applied rewrites28.8%
Applied rewrites32.1%
if -4e6 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.40000000000000002Initial program 89.1%
Taylor expanded in t around -inf
Applied rewrites57.2%
Applied rewrites57.2%
Taylor expanded in x around 0
Applied rewrites36.8%
Taylor expanded in x around 0
Applied rewrites36.8%
if 0.40000000000000002 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites46.2%
Taylor expanded in x around inf
Applied rewrites10.5%
Applied rewrites10.5%
Taylor expanded in undef-var around zero
Applied rewrites53.5%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites70.4%
(FPCore (x y z t) :precision binary64 :pre TRUE (let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))) (if (<= t_1 2e+229) t_1 (* (+ (/ y t) x) (/ -1.0 (- -1.0 x))))))
double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_1 <= 2e+229) {
tmp = t_1;
} else {
tmp = ((y / t) + x) * (-1.0 / (-1.0 - x));
}
return tmp;
}
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: tmp
t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
if (t_1 <= 2d+229) then
tmp = t_1
else
tmp = ((y / t) + x) * ((-1.0d0) / ((-1.0d0) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_1 <= 2e+229) {
tmp = t_1;
} else {
tmp = ((y / t) + x) * (-1.0 / (-1.0 - x));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0) tmp = 0 if t_1 <= 2e+229: tmp = t_1 else: tmp = ((y / t) + x) * (-1.0 / (-1.0 - x)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= 2e+229) tmp = t_1; else tmp = Float64(Float64(Float64(y / t) + x) * Float64(-1.0 / Float64(-1.0 - x))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); tmp = 0.0; if (t_1 <= 2e+229) tmp = t_1; else tmp = ((y / t) + x) * (-1.0 / (-1.0 - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+229], t$95$1, N[(N[(N[(y / t), $MachinePrecision] + x), $MachinePrecision] * N[(-1.0 / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = ((x + (((y * z) - x) / ((t * z) - x))) / (x + (1))) IN LET tmp = IF (t_1 <= (19999999999999999836777221245888555157266854023040746648359793341285923569054049205612780991738616816940675431370589468387985186797779692394447533106893958186103920770675008711375515345125281086808706628454884068855007427340271616)) THEN t_1 ELSE (((y / t) + x) * ((-1) / ((-1) - x))) ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+229}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y}{t} + x\right) \cdot \frac{-1}{-1 - x}\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2e229Initial program 89.1%
if 2e229 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites70.4%
Applied rewrites70.3%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0))))
(if (<= t_1 0.4)
(/ (- x (/ (- (/ x z) y) t)) 1.0)
(if (<= t_1 2e+229)
(/ (- x (fma y (/ z x) -1.0)) (+ x 1.0))
(* (+ (/ y t) x) (/ -1.0 (- -1.0 x)))))))double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_1 <= 0.4) {
tmp = (x - (((x / z) - y) / t)) / 1.0;
} else if (t_1 <= 2e+229) {
tmp = (x - fma(y, (z / x), -1.0)) / (x + 1.0);
} else {
tmp = ((y / t) + x) * (-1.0 / (-1.0 - x));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= 0.4) tmp = Float64(Float64(x - Float64(Float64(Float64(x / z) - y) / t)) / 1.0); elseif (t_1 <= 2e+229) tmp = Float64(Float64(x - fma(y, Float64(z / x), -1.0)) / Float64(x + 1.0)); else tmp = Float64(Float64(Float64(y / t) + x) * Float64(-1.0 / Float64(-1.0 - x))); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.4], N[(N[(x - N[(N[(N[(x / z), $MachinePrecision] - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision], If[LessEqual[t$95$1, 2e+229], N[(N[(x - N[(y * N[(z / x), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / t), $MachinePrecision] + x), $MachinePrecision] * N[(-1.0 / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = ((x + (((y * z) - x) / ((t * z) - x))) / (x + (1))) IN LET tmp_1 = IF (t_1 <= (19999999999999999836777221245888555157266854023040746648359793341285923569054049205612780991738616816940675431370589468387985186797779692394447533106893958186103920770675008711375515345125281086808706628454884068855007427340271616)) THEN ((x - ((y * (z / x)) + (-1))) / (x + (1))) ELSE (((y / t) + x) * ((-1) / ((-1) - x))) ENDIF IN LET tmp = IF (t_1 <= (40000000000000002220446049250313080847263336181640625e-53)) THEN ((x - (((x / z) - y) / t)) / (1)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\\
\mathbf{if}\;t\_1 \leq 0.4:\\
\;\;\;\;\frac{x - \frac{\frac{x}{z} - y}{t}}{1}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+229}:\\
\;\;\;\;\frac{x - \mathsf{fma}\left(y, \frac{z}{x}, -1\right)}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y}{t} + x\right) \cdot \frac{-1}{-1 - x}\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.40000000000000002Initial program 89.1%
Taylor expanded in t around -inf
Applied rewrites57.2%
Applied rewrites57.2%
Taylor expanded in x around 0
Applied rewrites36.8%
Taylor expanded in x around 0
Applied rewrites36.8%
if 0.40000000000000002 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2e229Initial program 89.1%
Taylor expanded in t around 0
Applied rewrites57.9%
Applied rewrites58.9%
Applied rewrites61.0%
if 2e229 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites70.4%
Applied rewrites70.3%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0))))
(if (<= t_1 0.4)
(/ (- x (/ (- (/ x z) y) t)) 1.0)
(if (<= t_1 20000000000000.0)
(/ (- 0.0 -1.0) 1.0)
(* (+ (/ y t) x) (/ -1.0 (- -1.0 x)))))))double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_1 <= 0.4) {
tmp = (x - (((x / z) - y) / t)) / 1.0;
} else if (t_1 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = ((y / t) + x) * (-1.0 / (-1.0 - x));
}
return tmp;
}
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: tmp
t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
if (t_1 <= 0.4d0) then
tmp = (x - (((x / z) - y) / t)) / 1.0d0
else if (t_1 <= 20000000000000.0d0) then
tmp = (0.0d0 - (-1.0d0)) / 1.0d0
else
tmp = ((y / t) + x) * ((-1.0d0) / ((-1.0d0) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_1 <= 0.4) {
tmp = (x - (((x / z) - y) / t)) / 1.0;
} else if (t_1 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = ((y / t) + x) * (-1.0 / (-1.0 - x));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0) tmp = 0 if t_1 <= 0.4: tmp = (x - (((x / z) - y) / t)) / 1.0 elif t_1 <= 20000000000000.0: tmp = (0.0 - -1.0) / 1.0 else: tmp = ((y / t) + x) * (-1.0 / (-1.0 - x)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= 0.4) tmp = Float64(Float64(x - Float64(Float64(Float64(x / z) - y) / t)) / 1.0); elseif (t_1 <= 20000000000000.0) tmp = Float64(Float64(0.0 - -1.0) / 1.0); else tmp = Float64(Float64(Float64(y / t) + x) * Float64(-1.0 / Float64(-1.0 - x))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); tmp = 0.0; if (t_1 <= 0.4) tmp = (x - (((x / z) - y) / t)) / 1.0; elseif (t_1 <= 20000000000000.0) tmp = (0.0 - -1.0) / 1.0; else tmp = ((y / t) + x) * (-1.0 / (-1.0 - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.4], N[(N[(x - N[(N[(N[(x / z), $MachinePrecision] - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision], If[LessEqual[t$95$1, 20000000000000.0], N[(N[(0.0 - -1.0), $MachinePrecision] / 1.0), $MachinePrecision], N[(N[(N[(y / t), $MachinePrecision] + x), $MachinePrecision] * N[(-1.0 / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = ((x + (((y * z) - x) / ((t * z) - x))) / (x + (1))) IN LET tmp_1 = IF (t_1 <= (2e13)) THEN (((0) - (-1)) / (1)) ELSE (((y / t) + x) * ((-1) / ((-1) - x))) ENDIF IN LET tmp = IF (t_1 <= (40000000000000002220446049250313080847263336181640625e-53)) THEN ((x - (((x / z) - y) / t)) / (1)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\\
\mathbf{if}\;t\_1 \leq 0.4:\\
\;\;\;\;\frac{x - \frac{\frac{x}{z} - y}{t}}{1}\\
\mathbf{elif}\;t\_1 \leq 20000000000000:\\
\;\;\;\;\frac{0 - -1}{1}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y}{t} + x\right) \cdot \frac{-1}{-1 - x}\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.40000000000000002Initial program 89.1%
Taylor expanded in t around -inf
Applied rewrites57.2%
Applied rewrites57.2%
Taylor expanded in x around 0
Applied rewrites36.8%
Taylor expanded in x around 0
Applied rewrites36.8%
if 0.40000000000000002 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2e13Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites46.2%
Taylor expanded in x around inf
Applied rewrites10.5%
Applied rewrites10.5%
Taylor expanded in undef-var around zero
Applied rewrites53.5%
if 2e13 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites70.4%
Applied rewrites70.3%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (* (+ (/ y t) x) (/ -1.0 (- -1.0 x))))
(t_2 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0))))
(if (<= t_2 0.4)
t_1
(if (<= t_2 20000000000000.0) (/ (- 0.0 -1.0) 1.0) t_1))))double code(double x, double y, double z, double t) {
double t_1 = ((y / t) + x) * (-1.0 / (-1.0 - x));
double t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_2 <= 0.4) {
tmp = t_1;
} else if (t_2 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((y / t) + x) * ((-1.0d0) / ((-1.0d0) - x))
t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
if (t_2 <= 0.4d0) then
tmp = t_1
else if (t_2 <= 20000000000000.0d0) then
tmp = (0.0d0 - (-1.0d0)) / 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = ((y / t) + x) * (-1.0 / (-1.0 - x));
double t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_2 <= 0.4) {
tmp = t_1;
} else if (t_2 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = ((y / t) + x) * (-1.0 / (-1.0 - x)) t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0) tmp = 0 if t_2 <= 0.4: tmp = t_1 elif t_2 <= 20000000000000.0: tmp = (0.0 - -1.0) / 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(y / t) + x) * Float64(-1.0 / Float64(-1.0 - x))) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= 0.4) tmp = t_1; elseif (t_2 <= 20000000000000.0) tmp = Float64(Float64(0.0 - -1.0) / 1.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = ((y / t) + x) * (-1.0 / (-1.0 - x)); t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); tmp = 0.0; if (t_2 <= 0.4) tmp = t_1; elseif (t_2 <= 20000000000000.0) tmp = (0.0 - -1.0) / 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[(y / t), $MachinePrecision] + x), $MachinePrecision] * N[(-1.0 / N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.4], t$95$1, If[LessEqual[t$95$2, 20000000000000.0], N[(N[(0.0 - -1.0), $MachinePrecision] / 1.0), $MachinePrecision], t$95$1]]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = (((y / t) + x) * ((-1) / ((-1) - x))) IN LET t_2 = ((x + (((y * z) - x) / ((t * z) - x))) / (x + (1))) IN LET tmp_1 = IF (t_2 <= (2e13)) THEN (((0) - (-1)) / (1)) ELSE t_1 ENDIF IN LET tmp = IF (t_2 <= (40000000000000002220446049250313080847263336181640625e-53)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \left(\frac{y}{t} + x\right) \cdot \frac{-1}{-1 - x}\\
t_2 := \frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\\
\mathbf{if}\;t\_2 \leq 0.4:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 20000000000000:\\
\;\;\;\;\frac{0 - -1}{1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.40000000000000002 or 2e13 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites70.4%
Applied rewrites70.3%
if 0.40000000000000002 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2e13Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites46.2%
Taylor expanded in x around inf
Applied rewrites10.5%
Applied rewrites10.5%
Taylor expanded in undef-var around zero
Applied rewrites53.5%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (+ x (/ y t)) (+ x 1.0)))
(t_2 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0))))
(if (<= t_2 0.4)
t_1
(if (<= t_2 20000000000000.0) (/ (- 0.0 -1.0) 1.0) t_1))))double code(double x, double y, double z, double t) {
double t_1 = (x + (y / t)) / (x + 1.0);
double t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_2 <= 0.4) {
tmp = t_1;
} else if (t_2 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + (y / t)) / (x + 1.0d0)
t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
if (t_2 <= 0.4d0) then
tmp = t_1
else if (t_2 <= 20000000000000.0d0) then
tmp = (0.0d0 - (-1.0d0)) / 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x + (y / t)) / (x + 1.0);
double t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_2 <= 0.4) {
tmp = t_1;
} else if (t_2 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x + (y / t)) / (x + 1.0) t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0) tmp = 0 if t_2 <= 0.4: tmp = t_1 elif t_2 <= 20000000000000.0: tmp = (0.0 - -1.0) / 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(y / t)) / Float64(x + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= 0.4) tmp = t_1; elseif (t_2 <= 20000000000000.0) tmp = Float64(Float64(0.0 - -1.0) / 1.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x + (y / t)) / (x + 1.0); t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); tmp = 0.0; if (t_2 <= 0.4) tmp = t_1; elseif (t_2 <= 20000000000000.0) tmp = (0.0 - -1.0) / 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.4], t$95$1, If[LessEqual[t$95$2, 20000000000000.0], N[(N[(0.0 - -1.0), $MachinePrecision] / 1.0), $MachinePrecision], t$95$1]]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = ((x + (y / t)) / (x + (1))) IN LET t_2 = ((x + (((y * z) - x) / ((t * z) - x))) / (x + (1))) IN LET tmp_1 = IF (t_2 <= (2e13)) THEN (((0) - (-1)) / (1)) ELSE t_1 ENDIF IN LET tmp = IF (t_2 <= (40000000000000002220446049250313080847263336181640625e-53)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{x + \frac{y}{t}}{x + 1}\\
t_2 := \frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\\
\mathbf{if}\;t\_2 \leq 0.4:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 20000000000000:\\
\;\;\;\;\frac{0 - -1}{1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.40000000000000002 or 2e13 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites70.4%
if 0.40000000000000002 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2e13Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites46.2%
Taylor expanded in x around inf
Applied rewrites10.5%
Applied rewrites10.5%
Taylor expanded in undef-var around zero
Applied rewrites53.5%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0))))
(if (<= t_1 0.4)
(/ (+ x (/ y t)) 1.0)
(if (<= t_1 20000000000000.0)
(/ (- 0.0 -1.0) 1.0)
(/ y (* t (+ 1.0 x)))))))double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_1 <= 0.4) {
tmp = (x + (y / t)) / 1.0;
} else if (t_1 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = y / (t * (1.0 + x));
}
return tmp;
}
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: tmp
t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
if (t_1 <= 0.4d0) then
tmp = (x + (y / t)) / 1.0d0
else if (t_1 <= 20000000000000.0d0) then
tmp = (0.0d0 - (-1.0d0)) / 1.0d0
else
tmp = y / (t * (1.0d0 + x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_1 <= 0.4) {
tmp = (x + (y / t)) / 1.0;
} else if (t_1 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = y / (t * (1.0 + x));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0) tmp = 0 if t_1 <= 0.4: tmp = (x + (y / t)) / 1.0 elif t_1 <= 20000000000000.0: tmp = (0.0 - -1.0) / 1.0 else: tmp = y / (t * (1.0 + x)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= 0.4) tmp = Float64(Float64(x + Float64(y / t)) / 1.0); elseif (t_1 <= 20000000000000.0) tmp = Float64(Float64(0.0 - -1.0) / 1.0); else tmp = Float64(y / Float64(t * Float64(1.0 + x))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); tmp = 0.0; if (t_1 <= 0.4) tmp = (x + (y / t)) / 1.0; elseif (t_1 <= 20000000000000.0) tmp = (0.0 - -1.0) / 1.0; else tmp = y / (t * (1.0 + x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.4], N[(N[(x + N[(y / t), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision], If[LessEqual[t$95$1, 20000000000000.0], N[(N[(0.0 - -1.0), $MachinePrecision] / 1.0), $MachinePrecision], N[(y / N[(t * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = ((x + (((y * z) - x) / ((t * z) - x))) / (x + (1))) IN LET tmp_1 = IF (t_1 <= (2e13)) THEN (((0) - (-1)) / (1)) ELSE (y / (t * ((1) + x))) ENDIF IN LET tmp = IF (t_1 <= (40000000000000002220446049250313080847263336181640625e-53)) THEN ((x + (y / t)) / (1)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\\
\mathbf{if}\;t\_1 \leq 0.4:\\
\;\;\;\;\frac{x + \frac{y}{t}}{1}\\
\mathbf{elif}\;t\_1 \leq 20000000000000:\\
\;\;\;\;\frac{0 - -1}{1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t \cdot \left(1 + x\right)}\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 0.40000000000000002Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites46.2%
Taylor expanded in x around 0
Applied rewrites34.4%
if 0.40000000000000002 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2e13Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites46.2%
Taylor expanded in x around inf
Applied rewrites10.5%
Applied rewrites10.5%
Taylor expanded in undef-var around zero
Applied rewrites53.5%
if 2e13 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in t around inf
Applied rewrites60.3%
Taylor expanded in x around inf
Applied rewrites23.6%
Taylor expanded in y around inf
Applied rewrites26.7%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (/ y (* t (+ 1.0 x))))
(t_2 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0))))
(if (<= t_2 -1e-100)
t_1
(if (<= t_2 2e-16)
(* (- 1.0 x) x)
(if (<= t_2 20000000000000.0) (/ (- 0.0 -1.0) 1.0) t_1)))))double code(double x, double y, double z, double t) {
double t_1 = y / (t * (1.0 + x));
double t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_2 <= -1e-100) {
tmp = t_1;
} else if (t_2 <= 2e-16) {
tmp = (1.0 - x) * x;
} else if (t_2 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y / (t * (1.0d0 + x))
t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
if (t_2 <= (-1d-100)) then
tmp = t_1
else if (t_2 <= 2d-16) then
tmp = (1.0d0 - x) * x
else if (t_2 <= 20000000000000.0d0) then
tmp = (0.0d0 - (-1.0d0)) / 1.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / (t * (1.0 + x));
double t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_2 <= -1e-100) {
tmp = t_1;
} else if (t_2 <= 2e-16) {
tmp = (1.0 - x) * x;
} else if (t_2 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (t * (1.0 + x)) t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0) tmp = 0 if t_2 <= -1e-100: tmp = t_1 elif t_2 <= 2e-16: tmp = (1.0 - x) * x elif t_2 <= 20000000000000.0: tmp = (0.0 - -1.0) / 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(t * Float64(1.0 + x))) t_2 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_2 <= -1e-100) tmp = t_1; elseif (t_2 <= 2e-16) tmp = Float64(Float64(1.0 - x) * x); elseif (t_2 <= 20000000000000.0) tmp = Float64(Float64(0.0 - -1.0) / 1.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (t * (1.0 + x)); t_2 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); tmp = 0.0; if (t_2 <= -1e-100) tmp = t_1; elseif (t_2 <= 2e-16) tmp = (1.0 - x) * x; elseif (t_2 <= 20000000000000.0) tmp = (0.0 - -1.0) / 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(t * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-100], t$95$1, If[LessEqual[t$95$2, 2e-16], N[(N[(1.0 - x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$2, 20000000000000.0], N[(N[(0.0 - -1.0), $MachinePrecision] / 1.0), $MachinePrecision], t$95$1]]]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = (y / (t * ((1) + x))) IN LET t_2 = ((x + (((y * z) - x) / ((t * z) - x))) / (x + (1))) IN LET tmp_2 = IF (t_2 <= (2e13)) THEN (((0) - (-1)) / (1)) ELSE t_1 ENDIF IN LET tmp_1 = IF (t_2 <= (1999999999999999958195573448069207123682229881693472872683514651726000010967254638671875e-103)) THEN (((1) - x) * x) ELSE tmp_2 ENDIF IN LET tmp = IF (t_2 <= (-100000000000000001999189980260288361964776078853415942018260300593659569925554346761767628861329298958274607481091185079852827053974965402226843604196126360835628314127871794272492894246908066589163059300043457860230145025079449986855914338755579873208034769049845635890960693359375e-381)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{y}{t \cdot \left(1 + x\right)}\\
t_2 := \frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-16}:\\
\;\;\;\;\left(1 - x\right) \cdot x\\
\mathbf{elif}\;t\_2 \leq 20000000000000:\\
\;\;\;\;\frac{0 - -1}{1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e-100 or 2e13 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in t around inf
Applied rewrites60.3%
Taylor expanded in x around inf
Applied rewrites23.6%
Taylor expanded in y around inf
Applied rewrites26.7%
if -1e-100 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2e-16Initial program 89.1%
Taylor expanded in t around inf
Applied rewrites56.0%
Taylor expanded in x around 0
Applied rewrites12.2%
Applied rewrites12.2%
if 2e-16 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2e13Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites46.2%
Taylor expanded in x around inf
Applied rewrites10.5%
Applied rewrites10.5%
Taylor expanded in undef-var around zero
Applied rewrites53.5%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0))))
(if (<= t_1 -1e-100)
(/ y t)
(if (<= t_1 2e-16)
(* (- 1.0 x) x)
(if (<= t_1 20000000000000.0) (/ (- 0.0 -1.0) 1.0) (/ y t))))))double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -1e-100) {
tmp = y / t;
} else if (t_1 <= 2e-16) {
tmp = (1.0 - x) * x;
} else if (t_1 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = y / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: tmp
t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0d0)
if (t_1 <= (-1d-100)) then
tmp = y / t
else if (t_1 <= 2d-16) then
tmp = (1.0d0 - x) * x
else if (t_1 <= 20000000000000.0d0) then
tmp = (0.0d0 - (-1.0d0)) / 1.0d0
else
tmp = y / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0);
double tmp;
if (t_1 <= -1e-100) {
tmp = y / t;
} else if (t_1 <= 2e-16) {
tmp = (1.0 - x) * x;
} else if (t_1 <= 20000000000000.0) {
tmp = (0.0 - -1.0) / 1.0;
} else {
tmp = y / t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0) tmp = 0 if t_1 <= -1e-100: tmp = y / t elif t_1 <= 2e-16: tmp = (1.0 - x) * x elif t_1 <= 20000000000000.0: tmp = (0.0 - -1.0) / 1.0 else: tmp = y / t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x + Float64(Float64(Float64(y * z) - x) / Float64(Float64(t * z) - x))) / Float64(x + 1.0)) tmp = 0.0 if (t_1 <= -1e-100) tmp = Float64(y / t); elseif (t_1 <= 2e-16) tmp = Float64(Float64(1.0 - x) * x); elseif (t_1 <= 20000000000000.0) tmp = Float64(Float64(0.0 - -1.0) / 1.0); else tmp = Float64(y / t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x + (((y * z) - x) / ((t * z) - x))) / (x + 1.0); tmp = 0.0; if (t_1 <= -1e-100) tmp = y / t; elseif (t_1 <= 2e-16) tmp = (1.0 - x) * x; elseif (t_1 <= 20000000000000.0) tmp = (0.0 - -1.0) / 1.0; else tmp = y / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x + N[(N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision] / N[(N[(t * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-100], N[(y / t), $MachinePrecision], If[LessEqual[t$95$1, 2e-16], N[(N[(1.0 - x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 20000000000000.0], N[(N[(0.0 - -1.0), $MachinePrecision] / 1.0), $MachinePrecision], N[(y / t), $MachinePrecision]]]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = ((x + (((y * z) - x) / ((t * z) - x))) / (x + (1))) IN LET tmp_2 = IF (t_1 <= (2e13)) THEN (((0) - (-1)) / (1)) ELSE (y / t) ENDIF IN LET tmp_1 = IF (t_1 <= (1999999999999999958195573448069207123682229881693472872683514651726000010967254638671875e-103)) THEN (((1) - x) * x) ELSE tmp_2 ENDIF IN LET tmp = IF (t_1 <= (-100000000000000001999189980260288361964776078853415942018260300593659569925554346761767628861329298958274607481091185079852827053974965402226843604196126360835628314127871794272492894246908066589163059300043457860230145025079449986855914338755579873208034769049845635890960693359375e-381)) THEN (y / t) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z - x}{t \cdot z - x}}{x + 1}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-100}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-16}:\\
\;\;\;\;\left(1 - x\right) \cdot x\\
\mathbf{elif}\;t\_1 \leq 20000000000000:\\
\;\;\;\;\frac{0 - -1}{1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t}\\
\end{array}
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < -1e-100 or 2e13 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) Initial program 89.1%
Taylor expanded in t around inf
Applied rewrites60.3%
Taylor expanded in x around inf
Applied rewrites23.6%
Taylor expanded in y around inf
Applied rewrites26.7%
Taylor expanded in x around 0
Applied rewrites24.6%
if -1e-100 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2e-16Initial program 89.1%
Taylor expanded in t around inf
Applied rewrites56.0%
Taylor expanded in x around 0
Applied rewrites12.2%
Applied rewrites12.2%
if 2e-16 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x #s(literal 1 binary64))) < 2e13Initial program 89.1%
Taylor expanded in x around 0
Applied rewrites46.2%
Taylor expanded in x around inf
Applied rewrites10.5%
Applied rewrites10.5%
Taylor expanded in undef-var around zero
Applied rewrites53.5%
(FPCore (x y z t)
:precision binary64
:pre TRUE
(let* ((t_1 (/ x (+ 1.0 x))))
(if (<= x -223311634634567.88)
t_1
(if (<= x 1.5185508361828327e-170) (/ y t) t_1))))double code(double x, double y, double z, double t) {
double t_1 = x / (1.0 + x);
double tmp;
if (x <= -223311634634567.88) {
tmp = t_1;
} else if (x <= 1.5185508361828327e-170) {
tmp = y / t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
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) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 + x)
if (x <= (-223311634634567.88d0)) then
tmp = t_1
else if (x <= 1.5185508361828327d-170) then
tmp = y / t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (1.0 + x);
double tmp;
if (x <= -223311634634567.88) {
tmp = t_1;
} else if (x <= 1.5185508361828327e-170) {
tmp = y / t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (1.0 + x) tmp = 0 if x <= -223311634634567.88: tmp = t_1 elif x <= 1.5185508361828327e-170: tmp = y / t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(1.0 + x)) tmp = 0.0 if (x <= -223311634634567.88) tmp = t_1; elseif (x <= 1.5185508361828327e-170) tmp = Float64(y / t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (1.0 + x); tmp = 0.0; if (x <= -223311634634567.88) tmp = t_1; elseif (x <= 1.5185508361828327e-170) tmp = y / t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -223311634634567.88], t$95$1, If[LessEqual[x, 1.5185508361828327e-170], N[(y / t), $MachinePrecision], t$95$1]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET t_1 = (x / ((1) + x)) IN LET tmp_1 = IF (x <= (15185508361828326643093902792597445495560799515598297708419036949177343610057702663100696606096242496685407058506361098582694956751559211823162285169171108970688904406539822293812704318687971987267441725826841399428965106457450881611237723016559860293094546697047541817822033250781785517112318182699890267882418082158837266516997256099397575738515499803014597663433141113644688333629281316924911315237463858840438746256040758453309535980224609375e-615)) THEN (y / t) ELSE t_1 ENDIF IN LET tmp = IF (x <= (-223311634634567875e-3)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_1 := \frac{x}{1 + x}\\
\mathbf{if}\;x \leq -223311634634567.88:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.5185508361828327 \cdot 10^{-170}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -223311634634567.88 or 1.5185508361828327e-170 < x Initial program 89.1%
Taylor expanded in t around inf
Applied rewrites56.0%
if -223311634634567.88 < x < 1.5185508361828327e-170Initial program 89.1%
Taylor expanded in t around inf
Applied rewrites60.3%
Taylor expanded in x around inf
Applied rewrites23.6%
Taylor expanded in y around inf
Applied rewrites26.7%
Taylor expanded in x around 0
Applied rewrites24.6%
(FPCore (x y z t) :precision binary64 :pre TRUE (if (<= y -1.4735050604442025e-108) (/ y t) (if (<= y 2.9366169851636768e-12) (* (- 1.0 x) x) (/ y t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4735050604442025e-108) {
tmp = y / t;
} else if (y <= 2.9366169851636768e-12) {
tmp = (1.0 - x) * x;
} else {
tmp = y / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
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) :: tmp
if (y <= (-1.4735050604442025d-108)) then
tmp = y / t
else if (y <= 2.9366169851636768d-12) then
tmp = (1.0d0 - x) * x
else
tmp = y / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4735050604442025e-108) {
tmp = y / t;
} else if (y <= 2.9366169851636768e-12) {
tmp = (1.0 - x) * x;
} else {
tmp = y / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.4735050604442025e-108: tmp = y / t elif y <= 2.9366169851636768e-12: tmp = (1.0 - x) * x else: tmp = y / t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.4735050604442025e-108) tmp = Float64(y / t); elseif (y <= 2.9366169851636768e-12) tmp = Float64(Float64(1.0 - x) * x); else tmp = Float64(y / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.4735050604442025e-108) tmp = y / t; elseif (y <= 2.9366169851636768e-12) tmp = (1.0 - x) * x; else tmp = y / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.4735050604442025e-108], N[(y / t), $MachinePrecision], If[LessEqual[y, 2.9366169851636768e-12], N[(N[(1.0 - x), $MachinePrecision] * x), $MachinePrecision], N[(y / t), $MachinePrecision]]]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = LET tmp_1 = IF (y <= (2936616985163676766335330173132302342305088860285877672140486538410186767578125e-90)) THEN (((1) - x) * x) ELSE (y / t) ENDIF IN LET tmp = IF (y <= (-1473505060444202532992503998653915800550244385448325808796279604313252575079395671296620793669037778563339493631482237497879158998748512655324462969573427816751619845836942180320589693356245224294548607494746244219811595207698680133488461238583875995828845610374942254328090029957820661365985870361328125e-411)) THEN (y / t) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;y \leq -1.4735050604442025 \cdot 10^{-108}:\\
\;\;\;\;\frac{y}{t}\\
\mathbf{elif}\;y \leq 2.9366169851636768 \cdot 10^{-12}:\\
\;\;\;\;\left(1 - x\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t}\\
\end{array}
if y < -1.4735050604442025e-108 or 2.9366169851636768e-12 < y Initial program 89.1%
Taylor expanded in t around inf
Applied rewrites60.3%
Taylor expanded in x around inf
Applied rewrites23.6%
Taylor expanded in y around inf
Applied rewrites26.7%
Taylor expanded in x around 0
Applied rewrites24.6%
if -1.4735050604442025e-108 < y < 2.9366169851636768e-12Initial program 89.1%
Taylor expanded in t around inf
Applied rewrites56.0%
Taylor expanded in x around 0
Applied rewrites12.2%
Applied rewrites12.2%
(FPCore (x y z t) :precision binary64 :pre TRUE (/ y t))
double code(double x, double y, double z, double t) {
return y / t;
}
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = y / t
end function
public static double code(double x, double y, double z, double t) {
return y / t;
}
def code(x, y, z, t): return y / t
function code(x, y, z, t) return Float64(y / t) end
function tmp = code(x, y, z, t) tmp = y / t; end
code[x_, y_, z_, t_] := N[(y / t), $MachinePrecision]
f(x, y, z, t): x in [-inf, +inf], y in [-inf, +inf], z in [-inf, +inf], t in [-inf, +inf] code: THEORY BEGIN f(x, y, z, t: real): real = y / t END code
\frac{y}{t}
Initial program 89.1%
Taylor expanded in t around inf
Applied rewrites60.3%
Taylor expanded in x around inf
Applied rewrites23.6%
Taylor expanded in y around inf
Applied rewrites26.7%
Taylor expanded in x around 0
Applied rewrites24.6%
herbie shell --seed 2026092
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))