
(FPCore (x y) :precision binary64 :pre TRUE (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
double code(double x, double y) {
return (x * ((x / y) + 1.0)) / (x + 1.0);
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
end function
public static double code(double x, double y) {
return (x * ((x / y) + 1.0)) / (x + 1.0);
}
def code(x, y): return (x * ((x / y) + 1.0)) / (x + 1.0)
function code(x, y) return Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) end
function tmp = code(x, y) tmp = (x * ((x / y) + 1.0)) / (x + 1.0); end
code[x_, y_] := N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = (x * ((x / y) + (1))) / (x + (1)) END code
\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 :pre TRUE (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
double code(double x, double y) {
return (x * ((x / y) + 1.0)) / (x + 1.0);
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
end function
public static double code(double x, double y) {
return (x * ((x / y) + 1.0)) / (x + 1.0);
}
def code(x, y): return (x * ((x / y) + 1.0)) / (x + 1.0)
function code(x, y) return Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) end
function tmp = code(x, y) tmp = (x * ((x / y) + 1.0)) / (x + 1.0); end
code[x_, y_] := N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = (x * ((x / y) + (1))) / (x + (1)) END code
\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
(t_1 (/ x (+ (/ y x) y))))
(if (<= t_0 -2e+41)
t_1
(if (<= t_0 1e+60) (/ (fma (/ x y) x x) (+ 1.0 x)) t_1))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x / ((y / x) + y);
double tmp;
if (t_0 <= -2e+41) {
tmp = t_1;
} else if (t_0 <= 1e+60) {
tmp = fma((x / y), x, x) / (1.0 + x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) t_1 = Float64(x / Float64(Float64(y / x) + y)) tmp = 0.0 if (t_0 <= -2e+41) tmp = t_1; elseif (t_0 <= 1e+60) tmp = Float64(fma(Float64(x / y), x, x) / Float64(1.0 + x)); else tmp = t_1; end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+41], t$95$1, If[LessEqual[t$95$0, 1e+60], N[(N[(N[(x / y), $MachinePrecision] * x + x), $MachinePrecision] / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET t_1 = (x / ((y / x) + y)) IN LET tmp_1 = IF (t_0 <= (999999999999999949387135297074018866963645011013410073083904)) THEN ((((x / y) * x) + x) / ((1) + x)) ELSE t_1 ENDIF IN LET tmp = IF (t_0 <= (-200000000000000001240017290081556638990336)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
t_1 := \frac{x}{\frac{y}{x} + y}\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 10^{+60}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{y}, x, x\right)}{1 + x}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -2e41 or 9.9999999999999995e59 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites88.7%
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites45.4%
Applied rewrites51.2%
if -2e41 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999995e59Initial program 88.9%
Applied rewrites88.9%
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0))))
(if (<= t_0 -2e+41)
(/ x (+ (/ y x) y))
(if (<= t_0 0.998)
(* x (/ (+ y x) (fma y x y)))
(if (<= t_0 2.0) (/ x (+ 1.0 x)) (/ x (* (+ 1.0 x) (/ y x))))))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double tmp;
if (t_0 <= -2e+41) {
tmp = x / ((y / x) + y);
} else if (t_0 <= 0.998) {
tmp = x * ((y + x) / fma(y, x, y));
} else if (t_0 <= 2.0) {
tmp = x / (1.0 + x);
} else {
tmp = x / ((1.0 + x) * (y / x));
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) tmp = 0.0 if (t_0 <= -2e+41) tmp = Float64(x / Float64(Float64(y / x) + y)); elseif (t_0 <= 0.998) tmp = Float64(x * Float64(Float64(y + x) / fma(y, x, y))); elseif (t_0 <= 2.0) tmp = Float64(x / Float64(1.0 + x)); else tmp = Float64(x / Float64(Float64(1.0 + x) * Float64(y / x))); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+41], N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 0.998], N[(x * N[(N[(y + x), $MachinePrecision] / N[(y * x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET tmp_2 = IF (t_0 <= (2)) THEN (x / ((1) + x)) ELSE (x / (((1) + x) * (y / x))) ENDIF IN LET tmp_1 = IF (t_0 <= (9979999999999999982236431605997495353221893310546875e-52)) THEN (x * ((y + x) / ((y * x) + y))) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-200000000000000001240017290081556638990336)) THEN (x / ((y / x) + y)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
\mathbf{if}\;t\_0 \leq -2 \cdot 10^{+41}:\\
\;\;\;\;\frac{x}{\frac{y}{x} + y}\\
\mathbf{elif}\;t\_0 \leq 0.998:\\
\;\;\;\;x \cdot \frac{y + x}{\mathsf{fma}\left(y, x, y\right)}\\
\mathbf{elif}\;t\_0 \leq 2:\\
\;\;\;\;\frac{x}{1 + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(1 + x\right) \cdot \frac{y}{x}}\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -2e41Initial program 88.9%
Applied rewrites88.7%
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites45.4%
Applied rewrites51.2%
if -2e41 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 0.998Initial program 88.9%
Applied rewrites87.9%
Applied rewrites87.9%
if 0.998 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 88.9%
Taylor expanded in y around inf
Applied rewrites50.9%
if 2 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites88.7%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites51.2%
(FPCore (x y) :precision binary64 :pre TRUE (* (/ x (+ 1.0 x)) (/ (+ y x) y)))
double code(double x, double y) {
return (x / (1.0 + x)) * ((y + x) / y);
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x / (1.0d0 + x)) * ((y + x) / y)
end function
public static double code(double x, double y) {
return (x / (1.0 + x)) * ((y + x) / y);
}
def code(x, y): return (x / (1.0 + x)) * ((y + x) / y)
function code(x, y) return Float64(Float64(x / Float64(1.0 + x)) * Float64(Float64(y + x) / y)) end
function tmp = code(x, y) tmp = (x / (1.0 + x)) * ((y + x) / y); end
code[x_, y_] := N[(N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = (x / ((1) + x)) * ((y + x) / y) END code
\frac{x}{1 + x} \cdot \frac{y + x}{y}
Initial program 88.9%
Applied rewrites99.9%
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0))))
(if (<= t_0 -50000.0)
(/ x (+ (/ y x) y))
(if (<= t_0 1e-23)
(* (fma (/ (- 1.0 y) y) x 1.0) x)
(if (<= t_0 2.0)
(/ 1.0 (+ 1.0 (/ 1.0 x)))
(/ x (* (+ 1.0 x) (/ y x))))))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double tmp;
if (t_0 <= -50000.0) {
tmp = x / ((y / x) + y);
} else if (t_0 <= 1e-23) {
tmp = fma(((1.0 - y) / y), x, 1.0) * x;
} else if (t_0 <= 2.0) {
tmp = 1.0 / (1.0 + (1.0 / x));
} else {
tmp = x / ((1.0 + x) * (y / x));
}
return tmp;
}
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) tmp = 0.0 if (t_0 <= -50000.0) tmp = Float64(x / Float64(Float64(y / x) + y)); elseif (t_0 <= 1e-23) tmp = Float64(fma(Float64(Float64(1.0 - y) / y), x, 1.0) * x); elseif (t_0 <= 2.0) tmp = Float64(1.0 / Float64(1.0 + Float64(1.0 / x))); else tmp = Float64(x / Float64(Float64(1.0 + x) * Float64(y / x))); end return tmp end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50000.0], N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-23], N[(N[(N[(N[(1.0 - y), $MachinePrecision] / y), $MachinePrecision] * x + 1.0), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(1.0 / N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET tmp_2 = IF (t_0 <= (2)) THEN ((1) / ((1) + ((1) / x))) ELSE (x / (((1) + x) * (y / x))) ENDIF IN LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN ((((((1) - y) / y) * x) + (1)) * x) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-5e4)) THEN (x / ((y / x) + y)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
\mathbf{if}\;t\_0 \leq -50000:\\
\;\;\;\;\frac{x}{\frac{y}{x} + y}\\
\mathbf{elif}\;t\_0 \leq 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1 - y}{y}, x, 1\right) \cdot x\\
\mathbf{elif}\;t\_0 \leq 2:\\
\;\;\;\;\frac{1}{1 + \frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(1 + x\right) \cdot \frac{y}{x}}\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -5e4Initial program 88.9%
Applied rewrites88.7%
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites45.4%
Applied rewrites51.2%
if -5e4 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24Initial program 88.9%
Taylor expanded in x around 0
Applied rewrites57.0%
Applied rewrites57.0%
if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 88.9%
Applied rewrites88.7%
Taylor expanded in y around inf
Applied rewrites50.8%
Taylor expanded in x around inf
Applied rewrites50.8%
if 2 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites88.7%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites51.2%
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0))))
(if (<= t_0 -50000.0)
(/ x (+ (/ y x) y))
(if (<= t_0 1e-23)
(* x (+ (/ x y) (/ y y)))
(if (<= t_0 2.0)
(/ 1.0 (+ 1.0 (/ 1.0 x)))
(/ x (* (+ 1.0 x) (/ y x))))))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double tmp;
if (t_0 <= -50000.0) {
tmp = x / ((y / x) + y);
} else if (t_0 <= 1e-23) {
tmp = x * ((x / y) + (y / y));
} else if (t_0 <= 2.0) {
tmp = 1.0 / (1.0 + (1.0 / x));
} else {
tmp = x / ((1.0 + x) * (y / x));
}
return tmp;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
if (t_0 <= (-50000.0d0)) then
tmp = x / ((y / x) + y)
else if (t_0 <= 1d-23) then
tmp = x * ((x / y) + (y / y))
else if (t_0 <= 2.0d0) then
tmp = 1.0d0 / (1.0d0 + (1.0d0 / x))
else
tmp = x / ((1.0d0 + x) * (y / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double tmp;
if (t_0 <= -50000.0) {
tmp = x / ((y / x) + y);
} else if (t_0 <= 1e-23) {
tmp = x * ((x / y) + (y / y));
} else if (t_0 <= 2.0) {
tmp = 1.0 / (1.0 + (1.0 / x));
} else {
tmp = x / ((1.0 + x) * (y / x));
}
return tmp;
}
def code(x, y): t_0 = (x * ((x / y) + 1.0)) / (x + 1.0) tmp = 0 if t_0 <= -50000.0: tmp = x / ((y / x) + y) elif t_0 <= 1e-23: tmp = x * ((x / y) + (y / y)) elif t_0 <= 2.0: tmp = 1.0 / (1.0 + (1.0 / x)) else: tmp = x / ((1.0 + x) * (y / x)) return tmp
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) tmp = 0.0 if (t_0 <= -50000.0) tmp = Float64(x / Float64(Float64(y / x) + y)); elseif (t_0 <= 1e-23) tmp = Float64(x * Float64(Float64(x / y) + Float64(y / y))); elseif (t_0 <= 2.0) tmp = Float64(1.0 / Float64(1.0 + Float64(1.0 / x))); else tmp = Float64(x / Float64(Float64(1.0 + x) * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y) t_0 = (x * ((x / y) + 1.0)) / (x + 1.0); tmp = 0.0; if (t_0 <= -50000.0) tmp = x / ((y / x) + y); elseif (t_0 <= 1e-23) tmp = x * ((x / y) + (y / y)); elseif (t_0 <= 2.0) tmp = 1.0 / (1.0 + (1.0 / x)); else tmp = x / ((1.0 + x) * (y / x)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50000.0], N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e-23], N[(x * N[(N[(x / y), $MachinePrecision] + N[(y / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(1.0 / N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(1.0 + x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET tmp_2 = IF (t_0 <= (2)) THEN ((1) / ((1) + ((1) / x))) ELSE (x / (((1) + x) * (y / x))) ENDIF IN LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN (x * ((x / y) + (y / y))) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-5e4)) THEN (x / ((y / x) + y)) ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
\mathbf{if}\;t\_0 \leq -50000:\\
\;\;\;\;\frac{x}{\frac{y}{x} + y}\\
\mathbf{elif}\;t\_0 \leq 10^{-23}:\\
\;\;\;\;x \cdot \left(\frac{x}{y} + \frac{y}{y}\right)\\
\mathbf{elif}\;t\_0 \leq 2:\\
\;\;\;\;\frac{1}{1 + \frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(1 + x\right) \cdot \frac{y}{x}}\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -5e4Initial program 88.9%
Applied rewrites88.7%
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites45.4%
Applied rewrites51.2%
if -5e4 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in x around 0
Applied rewrites57.1%
Applied rewrites57.1%
if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 88.9%
Applied rewrites88.7%
Taylor expanded in y around inf
Applied rewrites50.8%
Taylor expanded in x around inf
Applied rewrites50.8%
if 2 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites88.7%
Applied rewrites99.9%
Taylor expanded in x around inf
Applied rewrites51.2%
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
(t_1 (/ x (+ (/ y x) y))))
(if (<= t_0 -50000.0)
t_1
(if (<= t_0 1e-23)
(* x (+ (/ x y) (/ y y)))
(if (<= t_0 2.0) (/ 1.0 (+ 1.0 (/ 1.0 x))) t_1)))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x / ((y / x) + y);
double tmp;
if (t_0 <= -50000.0) {
tmp = t_1;
} else if (t_0 <= 1e-23) {
tmp = x * ((x / y) + (y / y));
} else if (t_0 <= 2.0) {
tmp = 1.0 / (1.0 + (1.0 / x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
t_1 = x / ((y / x) + y)
if (t_0 <= (-50000.0d0)) then
tmp = t_1
else if (t_0 <= 1d-23) then
tmp = x * ((x / y) + (y / y))
else if (t_0 <= 2.0d0) then
tmp = 1.0d0 / (1.0d0 + (1.0d0 / x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x / ((y / x) + y);
double tmp;
if (t_0 <= -50000.0) {
tmp = t_1;
} else if (t_0 <= 1e-23) {
tmp = x * ((x / y) + (y / y));
} else if (t_0 <= 2.0) {
tmp = 1.0 / (1.0 + (1.0 / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = (x * ((x / y) + 1.0)) / (x + 1.0) t_1 = x / ((y / x) + y) tmp = 0 if t_0 <= -50000.0: tmp = t_1 elif t_0 <= 1e-23: tmp = x * ((x / y) + (y / y)) elif t_0 <= 2.0: tmp = 1.0 / (1.0 + (1.0 / x)) else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) t_1 = Float64(x / Float64(Float64(y / x) + y)) tmp = 0.0 if (t_0 <= -50000.0) tmp = t_1; elseif (t_0 <= 1e-23) tmp = Float64(x * Float64(Float64(x / y) + Float64(y / y))); elseif (t_0 <= 2.0) tmp = Float64(1.0 / Float64(1.0 + Float64(1.0 / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = (x * ((x / y) + 1.0)) / (x + 1.0); t_1 = x / ((y / x) + y); tmp = 0.0; if (t_0 <= -50000.0) tmp = t_1; elseif (t_0 <= 1e-23) tmp = x * ((x / y) + (y / y)); elseif (t_0 <= 2.0) tmp = 1.0 / (1.0 + (1.0 / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50000.0], t$95$1, If[LessEqual[t$95$0, 1e-23], N[(x * N[(N[(x / y), $MachinePrecision] + N[(y / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(1.0 / N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET t_1 = (x / ((y / x) + y)) IN LET tmp_2 = IF (t_0 <= (2)) THEN ((1) / ((1) + ((1) / x))) ELSE t_1 ENDIF IN LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN (x * ((x / y) + (y / y))) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-5e4)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
t_1 := \frac{x}{\frac{y}{x} + y}\\
\mathbf{if}\;t\_0 \leq -50000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 10^{-23}:\\
\;\;\;\;x \cdot \left(\frac{x}{y} + \frac{y}{y}\right)\\
\mathbf{elif}\;t\_0 \leq 2:\\
\;\;\;\;\frac{1}{1 + \frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -5e4 or 2 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites88.7%
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites45.4%
Applied rewrites51.2%
if -5e4 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in x around 0
Applied rewrites57.1%
Applied rewrites57.1%
if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 88.9%
Applied rewrites88.7%
Taylor expanded in y around inf
Applied rewrites50.8%
Taylor expanded in x around inf
Applied rewrites50.8%
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
(t_1 (/ x (+ (/ y x) y))))
(if (<= t_0 -50000.0)
t_1
(if (<= t_0 1e-23)
(* x (/ (+ y x) y))
(if (<= t_0 2.0) (/ 1.0 (+ 1.0 (/ 1.0 x))) t_1)))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x / ((y / x) + y);
double tmp;
if (t_0 <= -50000.0) {
tmp = t_1;
} else if (t_0 <= 1e-23) {
tmp = x * ((y + x) / y);
} else if (t_0 <= 2.0) {
tmp = 1.0 / (1.0 + (1.0 / x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
t_1 = x / ((y / x) + y)
if (t_0 <= (-50000.0d0)) then
tmp = t_1
else if (t_0 <= 1d-23) then
tmp = x * ((y + x) / y)
else if (t_0 <= 2.0d0) then
tmp = 1.0d0 / (1.0d0 + (1.0d0 / x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x / ((y / x) + y);
double tmp;
if (t_0 <= -50000.0) {
tmp = t_1;
} else if (t_0 <= 1e-23) {
tmp = x * ((y + x) / y);
} else if (t_0 <= 2.0) {
tmp = 1.0 / (1.0 + (1.0 / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = (x * ((x / y) + 1.0)) / (x + 1.0) t_1 = x / ((y / x) + y) tmp = 0 if t_0 <= -50000.0: tmp = t_1 elif t_0 <= 1e-23: tmp = x * ((y + x) / y) elif t_0 <= 2.0: tmp = 1.0 / (1.0 + (1.0 / x)) else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) t_1 = Float64(x / Float64(Float64(y / x) + y)) tmp = 0.0 if (t_0 <= -50000.0) tmp = t_1; elseif (t_0 <= 1e-23) tmp = Float64(x * Float64(Float64(y + x) / y)); elseif (t_0 <= 2.0) tmp = Float64(1.0 / Float64(1.0 + Float64(1.0 / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = (x * ((x / y) + 1.0)) / (x + 1.0); t_1 = x / ((y / x) + y); tmp = 0.0; if (t_0 <= -50000.0) tmp = t_1; elseif (t_0 <= 1e-23) tmp = x * ((y + x) / y); elseif (t_0 <= 2.0) tmp = 1.0 / (1.0 + (1.0 / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x / N[(N[(y / x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50000.0], t$95$1, If[LessEqual[t$95$0, 1e-23], N[(x * N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2.0], N[(1.0 / N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET t_1 = (x / ((y / x) + y)) IN LET tmp_2 = IF (t_0 <= (2)) THEN ((1) / ((1) + ((1) / x))) ELSE t_1 ENDIF IN LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN (x * ((y + x) / y)) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-5e4)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
t_1 := \frac{x}{\frac{y}{x} + y}\\
\mathbf{if}\;t\_0 \leq -50000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 10^{-23}:\\
\;\;\;\;x \cdot \frac{y + x}{y}\\
\mathbf{elif}\;t\_0 \leq 2:\\
\;\;\;\;\frac{1}{1 + \frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -5e4 or 2 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites88.7%
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites45.4%
Applied rewrites51.2%
if -5e4 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in x around 0
Applied rewrites57.1%
if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 2Initial program 88.9%
Applied rewrites88.7%
Taylor expanded in y around inf
Applied rewrites50.8%
Taylor expanded in x around inf
Applied rewrites50.8%
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
(t_1 (* x (/ 1.0 y))))
(if (<= t_0 -1e+76)
t_1
(if (<= t_0 1e-23)
(* x (/ (+ y x) y))
(if (<= t_0 5e+26) (/ 1.0 (+ 1.0 (/ 1.0 x))) t_1)))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x * (1.0 / y);
double tmp;
if (t_0 <= -1e+76) {
tmp = t_1;
} else if (t_0 <= 1e-23) {
tmp = x * ((y + x) / y);
} else if (t_0 <= 5e+26) {
tmp = 1.0 / (1.0 + (1.0 / x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
t_1 = x * (1.0d0 / y)
if (t_0 <= (-1d+76)) then
tmp = t_1
else if (t_0 <= 1d-23) then
tmp = x * ((y + x) / y)
else if (t_0 <= 5d+26) then
tmp = 1.0d0 / (1.0d0 + (1.0d0 / x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x * (1.0 / y);
double tmp;
if (t_0 <= -1e+76) {
tmp = t_1;
} else if (t_0 <= 1e-23) {
tmp = x * ((y + x) / y);
} else if (t_0 <= 5e+26) {
tmp = 1.0 / (1.0 + (1.0 / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = (x * ((x / y) + 1.0)) / (x + 1.0) t_1 = x * (1.0 / y) tmp = 0 if t_0 <= -1e+76: tmp = t_1 elif t_0 <= 1e-23: tmp = x * ((y + x) / y) elif t_0 <= 5e+26: tmp = 1.0 / (1.0 + (1.0 / x)) else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) t_1 = Float64(x * Float64(1.0 / y)) tmp = 0.0 if (t_0 <= -1e+76) tmp = t_1; elseif (t_0 <= 1e-23) tmp = Float64(x * Float64(Float64(y + x) / y)); elseif (t_0 <= 5e+26) tmp = Float64(1.0 / Float64(1.0 + Float64(1.0 / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = (x * ((x / y) + 1.0)) / (x + 1.0); t_1 = x * (1.0 / y); tmp = 0.0; if (t_0 <= -1e+76) tmp = t_1; elseif (t_0 <= 1e-23) tmp = x * ((y + x) / y); elseif (t_0 <= 5e+26) tmp = 1.0 / (1.0 + (1.0 / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+76], t$95$1, If[LessEqual[t$95$0, 1e-23], N[(x * N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+26], N[(1.0 / N[(1.0 + N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET t_1 = (x * ((1) / y)) IN LET tmp_2 = IF (t_0 <= (500000000000000006643777536)) THEN ((1) / ((1) + ((1) / x))) ELSE t_1 ENDIF IN LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN (x * ((y + x) / y)) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-10000000000000000470601344959054695891559601407866630764278709534898249531392)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
t_1 := x \cdot \frac{1}{y}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 10^{-23}:\\
\;\;\;\;x \cdot \frac{y + x}{y}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\
\;\;\;\;\frac{1}{1 + \frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -1e76 or 5.0000000000000001e26 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in x around inf
Applied rewrites39.2%
if -1e76 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in x around 0
Applied rewrites57.1%
if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 5.0000000000000001e26Initial program 88.9%
Applied rewrites88.7%
Taylor expanded in y around inf
Applied rewrites50.8%
Taylor expanded in x around inf
Applied rewrites50.8%
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
(t_1 (* x (/ 1.0 y))))
(if (<= t_0 -1e+76)
t_1
(if (<= t_0 1e-23)
(* x (/ (+ y x) y))
(if (<= t_0 5e+26) (/ x (+ 1.0 x)) t_1)))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x * (1.0 / y);
double tmp;
if (t_0 <= -1e+76) {
tmp = t_1;
} else if (t_0 <= 1e-23) {
tmp = x * ((y + x) / y);
} else if (t_0 <= 5e+26) {
tmp = x / (1.0 + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
t_1 = x * (1.0d0 / y)
if (t_0 <= (-1d+76)) then
tmp = t_1
else if (t_0 <= 1d-23) then
tmp = x * ((y + x) / y)
else if (t_0 <= 5d+26) then
tmp = x / (1.0d0 + x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x * (1.0 / y);
double tmp;
if (t_0 <= -1e+76) {
tmp = t_1;
} else if (t_0 <= 1e-23) {
tmp = x * ((y + x) / y);
} else if (t_0 <= 5e+26) {
tmp = x / (1.0 + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = (x * ((x / y) + 1.0)) / (x + 1.0) t_1 = x * (1.0 / y) tmp = 0 if t_0 <= -1e+76: tmp = t_1 elif t_0 <= 1e-23: tmp = x * ((y + x) / y) elif t_0 <= 5e+26: tmp = x / (1.0 + x) else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) t_1 = Float64(x * Float64(1.0 / y)) tmp = 0.0 if (t_0 <= -1e+76) tmp = t_1; elseif (t_0 <= 1e-23) tmp = Float64(x * Float64(Float64(y + x) / y)); elseif (t_0 <= 5e+26) tmp = Float64(x / Float64(1.0 + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = (x * ((x / y) + 1.0)) / (x + 1.0); t_1 = x * (1.0 / y); tmp = 0.0; if (t_0 <= -1e+76) tmp = t_1; elseif (t_0 <= 1e-23) tmp = x * ((y + x) / y); elseif (t_0 <= 5e+26) tmp = x / (1.0 + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+76], t$95$1, If[LessEqual[t$95$0, 1e-23], N[(x * N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+26], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET t_1 = (x * ((1) / y)) IN LET tmp_2 = IF (t_0 <= (500000000000000006643777536)) THEN (x / ((1) + x)) ELSE t_1 ENDIF IN LET tmp_1 = IF (t_0 <= (9999999999999999604346980148993092553230786866765862587503680141039208439934782290947623550891876220703125e-129)) THEN (x * ((y + x) / y)) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-10000000000000000470601344959054695891559601407866630764278709534898249531392)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
t_1 := x \cdot \frac{1}{y}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 10^{-23}:\\
\;\;\;\;x \cdot \frac{y + x}{y}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{1 + x}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -1e76 or 5.0000000000000001e26 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in x around inf
Applied rewrites39.2%
if -1e76 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 9.9999999999999996e-24Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in x around 0
Applied rewrites57.1%
if 9.9999999999999996e-24 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 5.0000000000000001e26Initial program 88.9%
Taylor expanded in y around inf
Applied rewrites50.9%
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
(t_1 (* x (/ 1.0 y))))
(if (<= t_0 -1e+76)
t_1
(if (<= t_0 -2e-5)
(/ x (/ y x))
(if (<= t_0 5e+26) (/ x (+ 1.0 x)) t_1)))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x * (1.0 / y);
double tmp;
if (t_0 <= -1e+76) {
tmp = t_1;
} else if (t_0 <= -2e-5) {
tmp = x / (y / x);
} else if (t_0 <= 5e+26) {
tmp = x / (1.0 + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
t_1 = x * (1.0d0 / y)
if (t_0 <= (-1d+76)) then
tmp = t_1
else if (t_0 <= (-2d-5)) then
tmp = x / (y / x)
else if (t_0 <= 5d+26) then
tmp = x / (1.0d0 + x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x * (1.0 / y);
double tmp;
if (t_0 <= -1e+76) {
tmp = t_1;
} else if (t_0 <= -2e-5) {
tmp = x / (y / x);
} else if (t_0 <= 5e+26) {
tmp = x / (1.0 + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = (x * ((x / y) + 1.0)) / (x + 1.0) t_1 = x * (1.0 / y) tmp = 0 if t_0 <= -1e+76: tmp = t_1 elif t_0 <= -2e-5: tmp = x / (y / x) elif t_0 <= 5e+26: tmp = x / (1.0 + x) else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) t_1 = Float64(x * Float64(1.0 / y)) tmp = 0.0 if (t_0 <= -1e+76) tmp = t_1; elseif (t_0 <= -2e-5) tmp = Float64(x / Float64(y / x)); elseif (t_0 <= 5e+26) tmp = Float64(x / Float64(1.0 + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = (x * ((x / y) + 1.0)) / (x + 1.0); t_1 = x * (1.0 / y); tmp = 0.0; if (t_0 <= -1e+76) tmp = t_1; elseif (t_0 <= -2e-5) tmp = x / (y / x); elseif (t_0 <= 5e+26) tmp = x / (1.0 + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+76], t$95$1, If[LessEqual[t$95$0, -2e-5], N[(x / N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+26], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET t_1 = (x * ((1) / y)) IN LET tmp_2 = IF (t_0 <= (500000000000000006643777536)) THEN (x / ((1) + x)) ELSE t_1 ENDIF IN LET tmp_1 = IF (t_0 <= (-2000000000000000163606107828062619091724627651274204254150390625e-68)) THEN (x / (y / x)) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-10000000000000000470601344959054695891559601407866630764278709534898249531392)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
t_1 := x \cdot \frac{1}{y}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq -2 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{\frac{y}{x}}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{1 + x}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -1e76 or 5.0000000000000001e26 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in x around inf
Applied rewrites39.2%
if -1e76 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -2.0000000000000002e-5Initial program 88.9%
Applied rewrites88.7%
Applied rewrites99.9%
Taylor expanded in y around 0
Applied rewrites45.4%
Taylor expanded in x around 0
Applied rewrites21.4%
if -2.0000000000000002e-5 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 5.0000000000000001e26Initial program 88.9%
Taylor expanded in y around inf
Applied rewrites50.9%
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
(t_1 (* x (/ 1.0 y))))
(if (<= t_0 -1e+76)
t_1
(if (<= t_0 -2e-5)
(* x (/ x y))
(if (<= t_0 5e+26) (/ x (+ 1.0 x)) t_1)))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x * (1.0 / y);
double tmp;
if (t_0 <= -1e+76) {
tmp = t_1;
} else if (t_0 <= -2e-5) {
tmp = x * (x / y);
} else if (t_0 <= 5e+26) {
tmp = x / (1.0 + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
t_1 = x * (1.0d0 / y)
if (t_0 <= (-1d+76)) then
tmp = t_1
else if (t_0 <= (-2d-5)) then
tmp = x * (x / y)
else if (t_0 <= 5d+26) then
tmp = x / (1.0d0 + x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x * (1.0 / y);
double tmp;
if (t_0 <= -1e+76) {
tmp = t_1;
} else if (t_0 <= -2e-5) {
tmp = x * (x / y);
} else if (t_0 <= 5e+26) {
tmp = x / (1.0 + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = (x * ((x / y) + 1.0)) / (x + 1.0) t_1 = x * (1.0 / y) tmp = 0 if t_0 <= -1e+76: tmp = t_1 elif t_0 <= -2e-5: tmp = x * (x / y) elif t_0 <= 5e+26: tmp = x / (1.0 + x) else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) t_1 = Float64(x * Float64(1.0 / y)) tmp = 0.0 if (t_0 <= -1e+76) tmp = t_1; elseif (t_0 <= -2e-5) tmp = Float64(x * Float64(x / y)); elseif (t_0 <= 5e+26) tmp = Float64(x / Float64(1.0 + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = (x * ((x / y) + 1.0)) / (x + 1.0); t_1 = x * (1.0 / y); tmp = 0.0; if (t_0 <= -1e+76) tmp = t_1; elseif (t_0 <= -2e-5) tmp = x * (x / y); elseif (t_0 <= 5e+26) tmp = x / (1.0 + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+76], t$95$1, If[LessEqual[t$95$0, -2e-5], N[(x * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+26], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET t_1 = (x * ((1) / y)) IN LET tmp_2 = IF (t_0 <= (500000000000000006643777536)) THEN (x / ((1) + x)) ELSE t_1 ENDIF IN LET tmp_1 = IF (t_0 <= (-2000000000000000163606107828062619091724627651274204254150390625e-68)) THEN (x * (x / y)) ELSE tmp_2 ENDIF IN LET tmp = IF (t_0 <= (-10000000000000000470601344959054695891559601407866630764278709534898249531392)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
t_1 := x \cdot \frac{1}{y}\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq -2 \cdot 10^{-5}:\\
\;\;\;\;x \cdot \frac{x}{y}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{1 + x}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -1e76 or 5.0000000000000001e26 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in x around inf
Applied rewrites39.2%
if -1e76 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -2.0000000000000002e-5Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in y around 0
Applied rewrites45.4%
Taylor expanded in x around 0
Applied rewrites21.4%
if -2.0000000000000002e-5 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 5.0000000000000001e26Initial program 88.9%
Taylor expanded in y around inf
Applied rewrites50.9%
(FPCore (x y)
:precision binary64
:pre TRUE
(let* ((t_0 (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))
(t_1 (* x (/ 1.0 y))))
(if (<= t_0 -50000.0) t_1 (if (<= t_0 5e+26) (/ x (+ 1.0 x)) t_1))))double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x * (1.0 / y);
double tmp;
if (t_0 <= -50000.0) {
tmp = t_1;
} else if (t_0 <= 5e+26) {
tmp = x / (1.0 + x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x * ((x / y) + 1.0d0)) / (x + 1.0d0)
t_1 = x * (1.0d0 / y)
if (t_0 <= (-50000.0d0)) then
tmp = t_1
else if (t_0 <= 5d+26) then
tmp = x / (1.0d0 + x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x * ((x / y) + 1.0)) / (x + 1.0);
double t_1 = x * (1.0 / y);
double tmp;
if (t_0 <= -50000.0) {
tmp = t_1;
} else if (t_0 <= 5e+26) {
tmp = x / (1.0 + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = (x * ((x / y) + 1.0)) / (x + 1.0) t_1 = x * (1.0 / y) tmp = 0 if t_0 <= -50000.0: tmp = t_1 elif t_0 <= 5e+26: tmp = x / (1.0 + x) else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) t_1 = Float64(x * Float64(1.0 / y)) tmp = 0.0 if (t_0 <= -50000.0) tmp = t_1; elseif (t_0 <= 5e+26) tmp = Float64(x / Float64(1.0 + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = (x * ((x / y) + 1.0)) / (x + 1.0); t_1 = x * (1.0 / y); tmp = 0.0; if (t_0 <= -50000.0) tmp = t_1; elseif (t_0 <= 5e+26) tmp = x / (1.0 + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -50000.0], t$95$1, If[LessEqual[t$95$0, 5e+26], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET t_0 = ((x * ((x / y) + (1))) / (x + (1))) IN LET t_1 = (x * ((1) / y)) IN LET tmp_1 = IF (t_0 <= (500000000000000006643777536)) THEN (x / ((1) + x)) ELSE t_1 ENDIF IN LET tmp = IF (t_0 <= (-5e4)) THEN t_1 ELSE tmp_1 ENDIF IN tmp END code
\begin{array}{l}
t_0 := \frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1}\\
t_1 := x \cdot \frac{1}{y}\\
\mathbf{if}\;t\_0 \leq -50000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{1 + x}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -5e4 or 5.0000000000000001e26 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Applied rewrites87.9%
Taylor expanded in x around inf
Applied rewrites39.2%
if -5e4 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < 5.0000000000000001e26Initial program 88.9%
Taylor expanded in y around inf
Applied rewrites50.9%
(FPCore (x y) :precision binary64 :pre TRUE (if (<= (/ (* x (+ (/ x y) 1.0)) (+ x 1.0)) -1e+76) (/ -1.0 0.0) (/ x (+ 1.0 x))))
double code(double x, double y) {
double tmp;
if (((x * ((x / y) + 1.0)) / (x + 1.0)) <= -1e+76) {
tmp = -1.0 / 0.0;
} else {
tmp = x / (1.0 + x);
}
return tmp;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (((x * ((x / y) + 1.0d0)) / (x + 1.0d0)) <= (-1d+76)) then
tmp = (-1.0d0) / 0.0d0
else
tmp = x / (1.0d0 + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (((x * ((x / y) + 1.0)) / (x + 1.0)) <= -1e+76) {
tmp = -1.0 / 0.0;
} else {
tmp = x / (1.0 + x);
}
return tmp;
}
def code(x, y): tmp = 0 if ((x * ((x / y) + 1.0)) / (x + 1.0)) <= -1e+76: tmp = -1.0 / 0.0 else: tmp = x / (1.0 + x) return tmp
function code(x, y) tmp = 0.0 if (Float64(Float64(x * Float64(Float64(x / y) + 1.0)) / Float64(x + 1.0)) <= -1e+76) tmp = Float64(-1.0 / 0.0); else tmp = Float64(x / Float64(1.0 + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (((x * ((x / y) + 1.0)) / (x + 1.0)) <= -1e+76) tmp = -1.0 / 0.0; else tmp = x / (1.0 + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[(N[(x * N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], -1e+76], N[(-1.0 / 0.0), $MachinePrecision], N[(x / N[(1.0 + x), $MachinePrecision]), $MachinePrecision]]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = LET tmp = IF (((x * ((x / y) + (1))) / (x + (1))) <= (-10000000000000000470601344959054695891559601407866630764278709534898249531392)) THEN ((-1) / (0)) ELSE (x / ((1) + x)) ENDIF IN tmp END code
\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(\frac{x}{y} + 1\right)}{x + 1} \leq -1 \cdot 10^{+76}:\\
\;\;\;\;\frac{-1}{0}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + x}\\
\end{array}
if (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) < -1e76Initial program 88.9%
Taylor expanded in y around inf
Applied rewrites50.9%
Taylor expanded in x around inf
Applied rewrites13.6%
Taylor expanded in x around 0
Applied rewrites2.4%
Taylor expanded in undef-var around zero
Applied rewrites8.4%
if -1e76 < (/.f64 (*.f64 x (+.f64 (/.f64 x y) #s(literal 1 binary64))) (+.f64 x #s(literal 1 binary64))) Initial program 88.9%
Taylor expanded in y around inf
Applied rewrites50.9%
(FPCore (x y) :precision binary64 :pre TRUE (/ -1.0 0.0))
double code(double x, double y) {
return -1.0 / 0.0;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (-1.0d0) / 0.0d0
end function
public static double code(double x, double y) {
return -1.0 / 0.0;
}
def code(x, y): return -1.0 / 0.0
function code(x, y) return Float64(-1.0 / 0.0) end
function tmp = code(x, y) tmp = -1.0 / 0.0; end
code[x_, y_] := N[(-1.0 / 0.0), $MachinePrecision]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = (-1) / (0) END code
\frac{-1}{0}
Initial program 88.9%
Taylor expanded in y around inf
Applied rewrites50.9%
Taylor expanded in x around inf
Applied rewrites13.6%
Taylor expanded in x around 0
Applied rewrites2.4%
Taylor expanded in undef-var around zero
Applied rewrites8.4%
(FPCore (x y) :precision binary64 :pre TRUE (/ -1.0 x))
double code(double x, double y) {
return -1.0 / x;
}
real(8) function code(x, y)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (-1.0d0) / x
end function
public static double code(double x, double y) {
return -1.0 / x;
}
def code(x, y): return -1.0 / x
function code(x, y) return Float64(-1.0 / x) end
function tmp = code(x, y) tmp = -1.0 / x; end
code[x_, y_] := N[(-1.0 / x), $MachinePrecision]
f(x, y): x in [-inf, +inf], y in [-inf, +inf] code: THEORY BEGIN f(x, y: real): real = (-1) / x END code
\frac{-1}{x}
Initial program 88.9%
Taylor expanded in y around inf
Applied rewrites50.9%
Taylor expanded in x around inf
Applied rewrites13.6%
Taylor expanded in x around 0
Applied rewrites2.4%
herbie shell --seed 2026092
(FPCore (x y)
:name "Codec.Picture.Types:toneMapping from JuicyPixels-3.2.6.1"
:precision binary64
(/ (* x (+ (/ x y) 1.0)) (+ x 1.0)))