
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= y -6.4e-77) (not (<= y 4e-131))) (* (- (+ (+ (/ t (- a t)) 1.0) (/ x y)) (/ z (- a t))) y) (- (+ x y) (/ (* (- z t) y) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.4e-77) || !(y <= 4e-131)) {
tmp = ((((t / (a - t)) + 1.0) + (x / y)) - (z / (a - t))) * y;
} else {
tmp = (x + y) - (((z - t) * y) / (a - t));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-6.4d-77)) .or. (.not. (y <= 4d-131))) then
tmp = ((((t / (a - t)) + 1.0d0) + (x / y)) - (z / (a - t))) * y
else
tmp = (x + y) - (((z - t) * y) / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.4e-77) || !(y <= 4e-131)) {
tmp = ((((t / (a - t)) + 1.0) + (x / y)) - (z / (a - t))) * y;
} else {
tmp = (x + y) - (((z - t) * y) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6.4e-77) or not (y <= 4e-131): tmp = ((((t / (a - t)) + 1.0) + (x / y)) - (z / (a - t))) * y else: tmp = (x + y) - (((z - t) * y) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6.4e-77) || !(y <= 4e-131)) tmp = Float64(Float64(Float64(Float64(Float64(t / Float64(a - t)) + 1.0) + Float64(x / y)) - Float64(z / Float64(a - t))) * y); else tmp = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -6.4e-77) || ~((y <= 4e-131))) tmp = ((((t / (a - t)) + 1.0) + (x / y)) - (z / (a - t))) * y; else tmp = (x + y) - (((z - t) * y) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6.4e-77], N[Not[LessEqual[y, 4e-131]], $MachinePrecision]], N[(N[(N[(N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{-77} \lor \neg \left(y \leq 4 \cdot 10^{-131}\right):\\
\;\;\;\;\left(\left(\left(\frac{t}{a - t} + 1\right) + \frac{x}{y}\right) - \frac{z}{a - t}\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\end{array}
\end{array}
if y < -6.39999999999999999e-77 or 3.9999999999999999e-131 < y Initial program 63.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift--.f6491.4
Applied rewrites91.4%
if -6.39999999999999999e-77 < y < 3.9999999999999999e-131Initial program 96.8%
Final simplification93.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (<= t_1 -1e+306)
(* (+ 1.0 (/ (- t z) (- a t))) y)
(if (<= t_1 -5e-230)
t_1
(if (<= t_1 0.0)
(* (fma -1.0 (/ (- a z) t) (/ x y)) y)
(if (<= t_1 2e+307) t_1 (- y (* (- z t) (/ y (- a t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_1 <= -1e+306) {
tmp = (1.0 + ((t - z) / (a - t))) * y;
} else if (t_1 <= -5e-230) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = fma(-1.0, ((a - z) / t), (x / y)) * y;
} else if (t_1 <= 2e+307) {
tmp = t_1;
} else {
tmp = y - ((z - t) * (y / (a - t)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_1 <= -1e+306) tmp = Float64(Float64(1.0 + Float64(Float64(t - z) / Float64(a - t))) * y); elseif (t_1 <= -5e-230) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(fma(-1.0, Float64(Float64(a - z) / t), Float64(x / y)) * y); elseif (t_1 <= 2e+307) tmp = t_1; else tmp = Float64(y - Float64(Float64(z - t) * Float64(y / Float64(a - t)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+306], N[(N[(1.0 + N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, -5e-230], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(-1.0 * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 2e+307], t$95$1, N[(y - N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+306}:\\
\;\;\;\;\left(1 + \frac{t - z}{a - t}\right) \cdot y\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{a - z}{t}, \frac{x}{y}\right) \cdot y\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y - \left(z - t\right) \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.00000000000000002e306Initial program 44.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
sub-divN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f6462.9
Applied rewrites62.9%
if -1.00000000000000002e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -5.00000000000000035e-230 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.99999999999999997e307Initial program 98.1%
if -5.00000000000000035e-230 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 4.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift--.f6481.2
Applied rewrites81.2%
Taylor expanded in t around -inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lift-/.f6499.8
Applied rewrites99.8%
if 1.99999999999999997e307 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 39.5%
Taylor expanded in x around 0
*-commutativeN/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6469.2
Applied rewrites69.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (<= t_1 -1e+306)
(* (+ 1.0 (/ (- t z) (- a t))) y)
(if (<= t_1 -5e-230)
t_1
(if (<= t_1 0.0)
(- x (/ (* y (- a z)) t))
(if (<= t_1 2e+307) t_1 (- y (* (- z t) (/ y (- a t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_1 <= -1e+306) {
tmp = (1.0 + ((t - z) / (a - t))) * y;
} else if (t_1 <= -5e-230) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = x - ((y * (a - z)) / t);
} else if (t_1 <= 2e+307) {
tmp = t_1;
} else {
tmp = y - ((z - t) * (y / (a - t)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x + y) - (((z - t) * y) / (a - t))
if (t_1 <= (-1d+306)) then
tmp = (1.0d0 + ((t - z) / (a - t))) * y
else if (t_1 <= (-5d-230)) then
tmp = t_1
else if (t_1 <= 0.0d0) then
tmp = x - ((y * (a - z)) / t)
else if (t_1 <= 2d+307) then
tmp = t_1
else
tmp = y - ((z - t) * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_1 <= -1e+306) {
tmp = (1.0 + ((t - z) / (a - t))) * y;
} else if (t_1 <= -5e-230) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = x - ((y * (a - z)) / t);
} else if (t_1 <= 2e+307) {
tmp = t_1;
} else {
tmp = y - ((z - t) * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_1 <= -1e+306: tmp = (1.0 + ((t - z) / (a - t))) * y elif t_1 <= -5e-230: tmp = t_1 elif t_1 <= 0.0: tmp = x - ((y * (a - z)) / t) elif t_1 <= 2e+307: tmp = t_1 else: tmp = y - ((z - t) * (y / (a - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_1 <= -1e+306) tmp = Float64(Float64(1.0 + Float64(Float64(t - z) / Float64(a - t))) * y); elseif (t_1 <= -5e-230) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); elseif (t_1 <= 2e+307) tmp = t_1; else tmp = Float64(y - Float64(Float64(z - t) * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_1 <= -1e+306) tmp = (1.0 + ((t - z) / (a - t))) * y; elseif (t_1 <= -5e-230) tmp = t_1; elseif (t_1 <= 0.0) tmp = x - ((y * (a - z)) / t); elseif (t_1 <= 2e+307) tmp = t_1; else tmp = y - ((z - t) * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+306], N[(N[(1.0 + N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, -5e-230], t$95$1, If[LessEqual[t$95$1, 0.0], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+307], t$95$1, N[(y - N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+306}:\\
\;\;\;\;\left(1 + \frac{t - z}{a - t}\right) \cdot y\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-230}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y - \left(z - t\right) \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.00000000000000002e306Initial program 44.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
sub-divN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f6462.9
Applied rewrites62.9%
if -1.00000000000000002e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -5.00000000000000035e-230 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.99999999999999997e307Initial program 98.1%
if -5.00000000000000035e-230 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 4.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift--.f6481.2
Applied rewrites81.2%
Taylor expanded in t around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6495.2
Applied rewrites95.2%
if 1.99999999999999997e307 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 39.5%
Taylor expanded in x around 0
*-commutativeN/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6469.2
Applied rewrites69.2%
Final simplification89.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (* z (/ y (- a t)))))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (<= t_2 -1e+306)
t_1
(if (<= t_2 -5e-230)
(- (+ x y) (/ (* z y) a))
(if (<= t_2 1e-208) x (if (<= t_2 2e+307) (+ y x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - (z * (y / (a - t)));
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -1e+306) {
tmp = t_1;
} else if (t_2 <= -5e-230) {
tmp = (x + y) - ((z * y) / a);
} else if (t_2 <= 1e-208) {
tmp = x;
} else if (t_2 <= 2e+307) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y - (z * (y / (a - t)))
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 <= (-1d+306)) then
tmp = t_1
else if (t_2 <= (-5d-230)) then
tmp = (x + y) - ((z * y) / a)
else if (t_2 <= 1d-208) then
tmp = x
else if (t_2 <= 2d+307) then
tmp = y + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (z * (y / (a - t)));
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -1e+306) {
tmp = t_1;
} else if (t_2 <= -5e-230) {
tmp = (x + y) - ((z * y) / a);
} else if (t_2 <= 1e-208) {
tmp = x;
} else if (t_2 <= 2e+307) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (z * (y / (a - t))) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 <= -1e+306: tmp = t_1 elif t_2 <= -5e-230: tmp = (x + y) - ((z * y) / a) elif t_2 <= 1e-208: tmp = x elif t_2 <= 2e+307: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(z * Float64(y / Float64(a - t)))) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 <= -1e+306) tmp = t_1; elseif (t_2 <= -5e-230) tmp = Float64(Float64(x + y) - Float64(Float64(z * y) / a)); elseif (t_2 <= 1e-208) tmp = x; elseif (t_2 <= 2e+307) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (z * (y / (a - t))); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 <= -1e+306) tmp = t_1; elseif (t_2 <= -5e-230) tmp = (x + y) - ((z * y) / a); elseif (t_2 <= 1e-208) tmp = x; elseif (t_2 <= 2e+307) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+306], t$95$1, If[LessEqual[t$95$2, -5e-230], N[(N[(x + y), $MachinePrecision] - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e-208], x, If[LessEqual[t$95$2, 2e+307], N[(y + x), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \frac{y}{a - t}\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-230}:\\
\;\;\;\;\left(x + y\right) - \frac{z \cdot y}{a}\\
\mathbf{elif}\;t\_2 \leq 10^{-208}:\\
\;\;\;\;x\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.00000000000000002e306 or 1.99999999999999997e307 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 41.5%
Taylor expanded in x around 0
*-commutativeN/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6466.5
Applied rewrites66.5%
Taylor expanded in z around inf
Applied rewrites64.7%
if -1.00000000000000002e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -5.00000000000000035e-230Initial program 98.4%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6478.9
Applied rewrites78.9%
if -5.00000000000000035e-230 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.0000000000000001e-208Initial program 26.7%
Taylor expanded in x around inf
Applied rewrites70.5%
if 1.0000000000000001e-208 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.99999999999999997e307Initial program 97.7%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6483.1
Applied rewrites83.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (* z (/ y (- a t)))))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (<= t_2 -1e+306)
t_1
(if (<= t_2 -5e-230)
(+ y x)
(if (<= t_2 1e-208) x (if (<= t_2 2e+307) (+ y x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - (z * (y / (a - t)));
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -1e+306) {
tmp = t_1;
} else if (t_2 <= -5e-230) {
tmp = y + x;
} else if (t_2 <= 1e-208) {
tmp = x;
} else if (t_2 <= 2e+307) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y - (z * (y / (a - t)))
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 <= (-1d+306)) then
tmp = t_1
else if (t_2 <= (-5d-230)) then
tmp = y + x
else if (t_2 <= 1d-208) then
tmp = x
else if (t_2 <= 2d+307) then
tmp = y + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (z * (y / (a - t)));
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -1e+306) {
tmp = t_1;
} else if (t_2 <= -5e-230) {
tmp = y + x;
} else if (t_2 <= 1e-208) {
tmp = x;
} else if (t_2 <= 2e+307) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (z * (y / (a - t))) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 <= -1e+306: tmp = t_1 elif t_2 <= -5e-230: tmp = y + x elif t_2 <= 1e-208: tmp = x elif t_2 <= 2e+307: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(z * Float64(y / Float64(a - t)))) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 <= -1e+306) tmp = t_1; elseif (t_2 <= -5e-230) tmp = Float64(y + x); elseif (t_2 <= 1e-208) tmp = x; elseif (t_2 <= 2e+307) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (z * (y / (a - t))); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 <= -1e+306) tmp = t_1; elseif (t_2 <= -5e-230) tmp = y + x; elseif (t_2 <= 1e-208) tmp = x; elseif (t_2 <= 2e+307) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+306], t$95$1, If[LessEqual[t$95$2, -5e-230], N[(y + x), $MachinePrecision], If[LessEqual[t$95$2, 1e-208], x, If[LessEqual[t$95$2, 2e+307], N[(y + x), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \frac{y}{a - t}\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-230}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t\_2 \leq 10^{-208}:\\
\;\;\;\;x\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.00000000000000002e306 or 1.99999999999999997e307 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 41.5%
Taylor expanded in x around 0
*-commutativeN/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6466.5
Applied rewrites66.5%
Taylor expanded in z around inf
Applied rewrites64.7%
if -1.00000000000000002e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -5.00000000000000035e-230 or 1.0000000000000001e-208 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.99999999999999997e307Initial program 98.0%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6478.9
Applied rewrites78.9%
if -5.00000000000000035e-230 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.0000000000000001e-208Initial program 26.7%
Taylor expanded in x around inf
Applied rewrites70.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- z) (- a t)) y))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (<= t_2 -1e+306)
t_1
(if (<= t_2 -5e-230)
(+ y x)
(if (<= t_2 1e-208) x (if (<= t_2 2e+307) (+ y x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (-z / (a - t)) * y;
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -1e+306) {
tmp = t_1;
} else if (t_2 <= -5e-230) {
tmp = y + x;
} else if (t_2 <= 1e-208) {
tmp = x;
} else if (t_2 <= 2e+307) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-z / (a - t)) * y
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 <= (-1d+306)) then
tmp = t_1
else if (t_2 <= (-5d-230)) then
tmp = y + x
else if (t_2 <= 1d-208) then
tmp = x
else if (t_2 <= 2d+307) then
tmp = y + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (-z / (a - t)) * y;
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -1e+306) {
tmp = t_1;
} else if (t_2 <= -5e-230) {
tmp = y + x;
} else if (t_2 <= 1e-208) {
tmp = x;
} else if (t_2 <= 2e+307) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (-z / (a - t)) * y t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 <= -1e+306: tmp = t_1 elif t_2 <= -5e-230: tmp = y + x elif t_2 <= 1e-208: tmp = x elif t_2 <= 2e+307: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(-z) / Float64(a - t)) * y) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 <= -1e+306) tmp = t_1; elseif (t_2 <= -5e-230) tmp = Float64(y + x); elseif (t_2 <= 1e-208) tmp = x; elseif (t_2 <= 2e+307) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (-z / (a - t)) * y; t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 <= -1e+306) tmp = t_1; elseif (t_2 <= -5e-230) tmp = y + x; elseif (t_2 <= 1e-208) tmp = x; elseif (t_2 <= 2e+307) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-z) / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+306], t$95$1, If[LessEqual[t$95$2, -5e-230], N[(y + x), $MachinePrecision], If[LessEqual[t$95$2, 1e-208], x, If[LessEqual[t$95$2, 2e+307], N[(y + x), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-z}{a - t} \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-230}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t\_2 \leq 10^{-208}:\\
\;\;\;\;x\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.00000000000000002e306 or 1.99999999999999997e307 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 41.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift--.f6488.9
Applied rewrites88.9%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f64N/A
lift-/.f64N/A
lift--.f6460.7
Applied rewrites60.7%
if -1.00000000000000002e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -5.00000000000000035e-230 or 1.0000000000000001e-208 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.99999999999999997e307Initial program 98.0%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6478.9
Applied rewrites78.9%
if -5.00000000000000035e-230 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.0000000000000001e-208Initial program 26.7%
Taylor expanded in x around inf
Applied rewrites70.5%
Final simplification72.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (* z (/ y a)))) (t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (<= t_2 -1e+306)
t_1
(if (<= t_2 -5e-230)
(+ y x)
(if (<= t_2 1e-208) x (if (<= t_2 2e+307) (+ y x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - (z * (y / a));
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -1e+306) {
tmp = t_1;
} else if (t_2 <= -5e-230) {
tmp = y + x;
} else if (t_2 <= 1e-208) {
tmp = x;
} else if (t_2 <= 2e+307) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y - (z * (y / a))
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 <= (-1d+306)) then
tmp = t_1
else if (t_2 <= (-5d-230)) then
tmp = y + x
else if (t_2 <= 1d-208) then
tmp = x
else if (t_2 <= 2d+307) then
tmp = y + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (z * (y / a));
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -1e+306) {
tmp = t_1;
} else if (t_2 <= -5e-230) {
tmp = y + x;
} else if (t_2 <= 1e-208) {
tmp = x;
} else if (t_2 <= 2e+307) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (z * (y / a)) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 <= -1e+306: tmp = t_1 elif t_2 <= -5e-230: tmp = y + x elif t_2 <= 1e-208: tmp = x elif t_2 <= 2e+307: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(z * Float64(y / a))) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 <= -1e+306) tmp = t_1; elseif (t_2 <= -5e-230) tmp = Float64(y + x); elseif (t_2 <= 1e-208) tmp = x; elseif (t_2 <= 2e+307) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (z * (y / a)); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 <= -1e+306) tmp = t_1; elseif (t_2 <= -5e-230) tmp = y + x; elseif (t_2 <= 1e-208) tmp = x; elseif (t_2 <= 2e+307) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+306], t$95$1, If[LessEqual[t$95$2, -5e-230], N[(y + x), $MachinePrecision], If[LessEqual[t$95$2, 1e-208], x, If[LessEqual[t$95$2, 2e+307], N[(y + x), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - z \cdot \frac{y}{a}\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-230}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t\_2 \leq 10^{-208}:\\
\;\;\;\;x\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1.00000000000000002e306 or 1.99999999999999997e307 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 41.5%
Taylor expanded in x around 0
*-commutativeN/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6466.5
Applied rewrites66.5%
Taylor expanded in t around 0
Applied rewrites53.5%
Taylor expanded in z around inf
Applied rewrites53.8%
if -1.00000000000000002e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -5.00000000000000035e-230 or 1.0000000000000001e-208 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.99999999999999997e307Initial program 98.0%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6478.9
Applied rewrites78.9%
if -5.00000000000000035e-230 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1.0000000000000001e-208Initial program 26.7%
Taylor expanded in x around inf
Applied rewrites70.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.28e+72)
(+ y x)
(if (<= a -7.6e-128)
(- x (/ (* (- z t) y) (- a t)))
(if (<= a 4.8e-63)
(- x (/ (* y (- a z)) t))
(if (<= a 2e+187) (- (+ x y) (/ (* z y) a)) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.28e+72) {
tmp = y + x;
} else if (a <= -7.6e-128) {
tmp = x - (((z - t) * y) / (a - t));
} else if (a <= 4.8e-63) {
tmp = x - ((y * (a - z)) / t);
} else if (a <= 2e+187) {
tmp = (x + y) - ((z * y) / a);
} else {
tmp = y + x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.28d+72)) then
tmp = y + x
else if (a <= (-7.6d-128)) then
tmp = x - (((z - t) * y) / (a - t))
else if (a <= 4.8d-63) then
tmp = x - ((y * (a - z)) / t)
else if (a <= 2d+187) then
tmp = (x + y) - ((z * y) / a)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.28e+72) {
tmp = y + x;
} else if (a <= -7.6e-128) {
tmp = x - (((z - t) * y) / (a - t));
} else if (a <= 4.8e-63) {
tmp = x - ((y * (a - z)) / t);
} else if (a <= 2e+187) {
tmp = (x + y) - ((z * y) / a);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.28e+72: tmp = y + x elif a <= -7.6e-128: tmp = x - (((z - t) * y) / (a - t)) elif a <= 4.8e-63: tmp = x - ((y * (a - z)) / t) elif a <= 2e+187: tmp = (x + y) - ((z * y) / a) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.28e+72) tmp = Float64(y + x); elseif (a <= -7.6e-128) tmp = Float64(x - Float64(Float64(Float64(z - t) * y) / Float64(a - t))); elseif (a <= 4.8e-63) tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); elseif (a <= 2e+187) tmp = Float64(Float64(x + y) - Float64(Float64(z * y) / a)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.28e+72) tmp = y + x; elseif (a <= -7.6e-128) tmp = x - (((z - t) * y) / (a - t)); elseif (a <= 4.8e-63) tmp = x - ((y * (a - z)) / t); elseif (a <= 2e+187) tmp = (x + y) - ((z * y) / a); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.28e+72], N[(y + x), $MachinePrecision], If[LessEqual[a, -7.6e-128], N[(x - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.8e-63], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e+187], N[(N[(x + y), $MachinePrecision] - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.28 \cdot 10^{+72}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -7.6 \cdot 10^{-128}:\\
\;\;\;\;x - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-63}:\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+187}:\\
\;\;\;\;\left(x + y\right) - \frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -1.28000000000000009e72 or 1.99999999999999981e187 < a Initial program 75.0%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6487.9
Applied rewrites87.9%
if -1.28000000000000009e72 < a < -7.6000000000000005e-128Initial program 88.8%
Taylor expanded in x around inf
Applied rewrites78.8%
if -7.6000000000000005e-128 < a < 4.8000000000000001e-63Initial program 72.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift--.f6483.8
Applied rewrites83.8%
Taylor expanded in t around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6484.7
Applied rewrites84.7%
if 4.8000000000000001e-63 < a < 1.99999999999999981e187Initial program 70.9%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6474.2
Applied rewrites74.2%
Final simplification82.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.85e-121) (not (<= t 0.185))) (- x (/ (* y (- a z)) t)) (- (+ x y) (/ (* z y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.85e-121) || !(t <= 0.185)) {
tmp = x - ((y * (a - z)) / t);
} else {
tmp = (x + y) - ((z * y) / a);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.85d-121)) .or. (.not. (t <= 0.185d0))) then
tmp = x - ((y * (a - z)) / t)
else
tmp = (x + y) - ((z * y) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.85e-121) || !(t <= 0.185)) {
tmp = x - ((y * (a - z)) / t);
} else {
tmp = (x + y) - ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.85e-121) or not (t <= 0.185): tmp = x - ((y * (a - z)) / t) else: tmp = (x + y) - ((z * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.85e-121) || !(t <= 0.185)) tmp = Float64(x - Float64(Float64(y * Float64(a - z)) / t)); else tmp = Float64(Float64(x + y) - Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.85e-121) || ~((t <= 0.185))) tmp = x - ((y * (a - z)) / t); else tmp = (x + y) - ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.85e-121], N[Not[LessEqual[t, 0.185]], $MachinePrecision]], N[(x - N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{-121} \lor \neg \left(t \leq 0.185\right):\\
\;\;\;\;x - \frac{y \cdot \left(a - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if t < -1.8500000000000001e-121 or 0.185 < t Initial program 64.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift--.f6474.1
Applied rewrites74.1%
Taylor expanded in t around -inf
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f6476.6
Applied rewrites76.6%
if -1.8500000000000001e-121 < t < 0.185Initial program 92.1%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6484.1
Applied rewrites84.1%
Final simplification79.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.8e-54)
(+ y x)
(if (<= a -1.22e-179)
x
(if (<= a 9.5e-273) (* (/ z t) y) (if (<= a 2.5e+50) x (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.8e-54) {
tmp = y + x;
} else if (a <= -1.22e-179) {
tmp = x;
} else if (a <= 9.5e-273) {
tmp = (z / t) * y;
} else if (a <= 2.5e+50) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-9.8d-54)) then
tmp = y + x
else if (a <= (-1.22d-179)) then
tmp = x
else if (a <= 9.5d-273) then
tmp = (z / t) * y
else if (a <= 2.5d+50) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.8e-54) {
tmp = y + x;
} else if (a <= -1.22e-179) {
tmp = x;
} else if (a <= 9.5e-273) {
tmp = (z / t) * y;
} else if (a <= 2.5e+50) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.8e-54: tmp = y + x elif a <= -1.22e-179: tmp = x elif a <= 9.5e-273: tmp = (z / t) * y elif a <= 2.5e+50: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.8e-54) tmp = Float64(y + x); elseif (a <= -1.22e-179) tmp = x; elseif (a <= 9.5e-273) tmp = Float64(Float64(z / t) * y); elseif (a <= 2.5e+50) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.8e-54) tmp = y + x; elseif (a <= -1.22e-179) tmp = x; elseif (a <= 9.5e-273) tmp = (z / t) * y; elseif (a <= 2.5e+50) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.8e-54], N[(y + x), $MachinePrecision], If[LessEqual[a, -1.22e-179], x, If[LessEqual[a, 9.5e-273], N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[a, 2.5e+50], x, N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.8 \cdot 10^{-54}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -1.22 \cdot 10^{-179}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-273}:\\
\;\;\;\;\frac{z}{t} \cdot y\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+50}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -9.80000000000000042e-54 or 2.5e50 < a Initial program 75.4%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6477.1
Applied rewrites77.1%
if -9.80000000000000042e-54 < a < -1.22e-179 or 9.49999999999999925e-273 < a < 2.5e50Initial program 72.8%
Taylor expanded in x around inf
Applied rewrites60.6%
if -1.22e-179 < a < 9.49999999999999925e-273Initial program 77.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift--.f6487.1
Applied rewrites87.1%
Taylor expanded in t around -inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lift-/.f6478.0
Applied rewrites78.0%
Taylor expanded in z around inf
lower-/.f6458.1
Applied rewrites58.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.1e-51)
(+ y x)
(if (<= a -1.8e-247)
x
(if (<= a 9.5e-273) (/ (* y z) t) (if (<= a 2.5e+50) x (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.1e-51) {
tmp = y + x;
} else if (a <= -1.8e-247) {
tmp = x;
} else if (a <= 9.5e-273) {
tmp = (y * z) / t;
} else if (a <= 2.5e+50) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.1d-51)) then
tmp = y + x
else if (a <= (-1.8d-247)) then
tmp = x
else if (a <= 9.5d-273) then
tmp = (y * z) / t
else if (a <= 2.5d+50) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.1e-51) {
tmp = y + x;
} else if (a <= -1.8e-247) {
tmp = x;
} else if (a <= 9.5e-273) {
tmp = (y * z) / t;
} else if (a <= 2.5e+50) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.1e-51: tmp = y + x elif a <= -1.8e-247: tmp = x elif a <= 9.5e-273: tmp = (y * z) / t elif a <= 2.5e+50: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.1e-51) tmp = Float64(y + x); elseif (a <= -1.8e-247) tmp = x; elseif (a <= 9.5e-273) tmp = Float64(Float64(y * z) / t); elseif (a <= 2.5e+50) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.1e-51) tmp = y + x; elseif (a <= -1.8e-247) tmp = x; elseif (a <= 9.5e-273) tmp = (y * z) / t; elseif (a <= 2.5e+50) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.1e-51], N[(y + x), $MachinePrecision], If[LessEqual[a, -1.8e-247], x, If[LessEqual[a, 9.5e-273], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 2.5e+50], x, N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{-51}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-247}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-273}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+50}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -3.0999999999999997e-51 or 2.5e50 < a Initial program 75.2%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6477.7
Applied rewrites77.7%
if -3.0999999999999997e-51 < a < -1.7999999999999998e-247 or 9.49999999999999925e-273 < a < 2.5e50Initial program 73.5%
Taylor expanded in x around inf
Applied rewrites56.7%
if -1.7999999999999998e-247 < a < 9.49999999999999925e-273Initial program 79.7%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift--.f6475.7
Applied rewrites75.7%
Taylor expanded in t around inf
lower-/.f64N/A
lower-*.f6467.4
Applied rewrites67.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.1e-51) (not (<= a 2.5e+50))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.1e-51) || !(a <= 2.5e+50)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3.1d-51)) .or. (.not. (a <= 2.5d+50))) then
tmp = y + x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.1e-51) || !(a <= 2.5e+50)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.1e-51) or not (a <= 2.5e+50): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.1e-51) || !(a <= 2.5e+50)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.1e-51) || ~((a <= 2.5e+50))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.1e-51], N[Not[LessEqual[a, 2.5e+50]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{-51} \lor \neg \left(a \leq 2.5 \cdot 10^{+50}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.0999999999999997e-51 or 2.5e50 < a Initial program 75.2%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6477.7
Applied rewrites77.7%
if -3.0999999999999997e-51 < a < 2.5e50Initial program 74.6%
Taylor expanded in x around inf
Applied rewrites50.7%
Final simplification63.4%
(FPCore (x y z t a) :precision binary64 (if (<= y 2.6e+103) x y))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.6e+103) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 2.6d+103) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 2.6e+103) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 2.6e+103: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 2.6e+103) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 2.6e+103) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 2.6e+103], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{+103}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 2.6000000000000002e103Initial program 79.3%
Taylor expanded in x around inf
Applied rewrites54.7%
if 2.6000000000000002e103 < y Initial program 53.6%
Taylor expanded in x around 0
*-commutativeN/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6463.0
Applied rewrites63.0%
Taylor expanded in a around inf
Applied rewrites37.2%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 74.9%
Taylor expanded in x around inf
Applied rewrites48.7%
herbie shell --seed 2025085
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))
(- (+ x y) (/ (* (- z t) y) (- a t))))