
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / 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, b)
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), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / 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, b)
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), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (/ b t) y (- a -1.0))))
(if (<= t -2.4e-113)
(fma y (/ (/ z t) t_1) (/ x t_1))
(if (<= t 1.8e-89)
(/ (fma x t (* y z)) (fma y b (fma a t t)))
(/
(/ (fma (/ z t) y x) (fma y (/ (/ b t) (- a -1.0)) 1.0))
(- a -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((b / t), y, (a - -1.0));
double tmp;
if (t <= -2.4e-113) {
tmp = fma(y, ((z / t) / t_1), (x / t_1));
} else if (t <= 1.8e-89) {
tmp = fma(x, t, (y * z)) / fma(y, b, fma(a, t, t));
} else {
tmp = (fma((z / t), y, x) / fma(y, ((b / t) / (a - -1.0)), 1.0)) / (a - -1.0);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(b / t), y, Float64(a - -1.0)) tmp = 0.0 if (t <= -2.4e-113) tmp = fma(y, Float64(Float64(z / t) / t_1), Float64(x / t_1)); elseif (t <= 1.8e-89) tmp = Float64(fma(x, t, Float64(y * z)) / fma(y, b, fma(a, t, t))); else tmp = Float64(Float64(fma(Float64(z / t), y, x) / fma(y, Float64(Float64(b / t) / Float64(a - -1.0)), 1.0)) / Float64(a - -1.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(b / t), $MachinePrecision] * y + N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e-113], N[(y * N[(N[(z / t), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(x / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-89], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b + N[(a * t + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision] / N[(y * N[(N[(b / t), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{b}{t}, y, a - -1\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-113}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\frac{z}{t}}{t\_1}, \frac{x}{t\_1}\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-89}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{\mathsf{fma}\left(y, b, \mathsf{fma}\left(a, t, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(y, \frac{\frac{b}{t}}{a - -1}, 1\right)}}{a - -1}\\
\end{array}
\end{array}
if t < -2.40000000000000012e-113Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
div-addN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites76.4%
if -2.40000000000000012e-113 < t < 1.80000000000000003e-89Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
sum-to-multN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites76.4%
Applied rewrites69.2%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6469.2
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-flipN/A
metadata-evalN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f6469.2
Applied rewrites69.2%
if 1.80000000000000003e-89 < t Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
sum-to-multN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites76.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(/ (fma (/ z t) y x) (fma y (/ (/ b t) (- a -1.0)) 1.0))
(- a -1.0))))
(if (<= t -2.4e-113)
t_1
(if (<= t 1.8e-89) (/ (fma x t (* y z)) (fma y b (fma a t t))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (fma((z / t), y, x) / fma(y, ((b / t) / (a - -1.0)), 1.0)) / (a - -1.0);
double tmp;
if (t <= -2.4e-113) {
tmp = t_1;
} else if (t <= 1.8e-89) {
tmp = fma(x, t, (y * z)) / fma(y, b, fma(a, t, t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(fma(Float64(z / t), y, x) / fma(y, Float64(Float64(b / t) / Float64(a - -1.0)), 1.0)) / Float64(a - -1.0)) tmp = 0.0 if (t <= -2.4e-113) tmp = t_1; elseif (t <= 1.8e-89) tmp = Float64(fma(x, t, Float64(y * z)) / fma(y, b, fma(a, t, t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision] / N[(y * N[(N[(b / t), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e-113], t$95$1, If[LessEqual[t, 1.8e-89], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b + N[(a * t + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(y, \frac{\frac{b}{t}}{a - -1}, 1\right)}}{a - -1}\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-89}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{\mathsf{fma}\left(y, b, \mathsf{fma}\left(a, t, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.40000000000000012e-113 or 1.80000000000000003e-89 < t Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
sum-to-multN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites76.4%
if -2.40000000000000012e-113 < t < 1.80000000000000003e-89Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
sum-to-multN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites76.4%
Applied rewrites69.2%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6469.2
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-flipN/A
metadata-evalN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f6469.2
Applied rewrites69.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (fma (/ z t) y x) (fma (/ b t) y (- a -1.0)))))
(if (<= t -2.4e-113)
t_1
(if (<= t 2.6e-45) (/ (fma x t (* y z)) (fma y b (fma a t t))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((z / t), y, x) / fma((b / t), y, (a - -1.0));
double tmp;
if (t <= -2.4e-113) {
tmp = t_1;
} else if (t <= 2.6e-45) {
tmp = fma(x, t, (y * z)) / fma(y, b, fma(a, t, t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(z / t), y, x) / fma(Float64(b / t), y, Float64(a - -1.0))) tmp = 0.0 if (t <= -2.4e-113) tmp = t_1; elseif (t <= 2.6e-45) tmp = Float64(fma(x, t, Float64(y * z)) / fma(y, b, fma(a, t, t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision] / N[(N[(b / t), $MachinePrecision] * y + N[(a - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e-113], t$95$1, If[LessEqual[t, 2.6e-45], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b + N[(a * t + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(\frac{b}{t}, y, a - -1\right)}\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-45}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{\mathsf{fma}\left(y, b, \mathsf{fma}\left(a, t, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.40000000000000012e-113 or 2.59999999999999987e-45 < t Initial program 75.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6474.2
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6475.0
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
metadata-eval75.0
Applied rewrites75.0%
if -2.40000000000000012e-113 < t < 2.59999999999999987e-45Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
sum-to-multN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites76.4%
Applied rewrites69.2%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6469.2
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-flipN/A
metadata-evalN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f6469.2
Applied rewrites69.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) (+ 1.0 a))))
(if (<= t -2.05e+77)
t_1
(if (<= t 2.1e+92) (/ (fma x t (* y z)) (fma y b (fma a t t))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / (1.0 + a);
double tmp;
if (t <= -2.05e+77) {
tmp = t_1;
} else if (t <= 2.1e+92) {
tmp = fma(x, t, (y * z)) / fma(y, b, fma(a, t, t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(1.0 + a)) tmp = 0.0 if (t <= -2.05e+77) tmp = t_1; elseif (t <= 2.1e+92) tmp = Float64(fma(x, t, Float64(y * z)) / fma(y, b, fma(a, t, t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.05e+77], t$95$1, If[LessEqual[t, 2.1e+92], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b + N[(a * t + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{1 + a}\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+92}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{\mathsf{fma}\left(y, b, \mathsf{fma}\left(a, t, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.05e77 or 2.09999999999999986e92 < t Initial program 75.1%
Taylor expanded in y around 0
lower-+.f6457.0
Applied rewrites57.0%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
div-flipN/A
mult-flip-revN/A
lower-/.f64N/A
lower-/.f6457.3
Applied rewrites57.3%
if -2.05e77 < t < 2.09999999999999986e92Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
sum-to-multN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites76.4%
Applied rewrites69.2%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6469.2
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-flipN/A
metadata-evalN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f6469.2
Applied rewrites69.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t))))
(t_3 (/ (* y z) (fma b y (* (- a -1.0) t)))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -2e-286)
(/ t_1 (- a -1.0))
(if (<= t_2 4e-269)
t_3
(if (<= t_2 INFINITY) (/ (+ x (* z (/ y t))) (+ 1.0 a)) (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_3 = (y * z) / fma(b, y, ((a - -1.0) * t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -2e-286) {
tmp = t_1 / (a - -1.0);
} else if (t_2 <= 4e-269) {
tmp = t_3;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (x + (z * (y / t))) / (1.0 + a);
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_3 = Float64(Float64(y * z) / fma(b, y, Float64(Float64(a - -1.0) * t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -2e-286) tmp = Float64(t_1 / Float64(a - -1.0)); elseif (t_2 <= 4e-269) tmp = t_3; elseif (t_2 <= Inf) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(1.0 + a)); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * z), $MachinePrecision] / N[(b * y + N[(N[(a - -1.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -2e-286], N[(t$95$1 / N[(a - -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e-269], t$95$3, If[LessEqual[t$95$2, Infinity], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + a), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_3 := \frac{y \cdot z}{\mathsf{fma}\left(b, y, \left(a - -1\right) \cdot t\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-286}:\\
\;\;\;\;\frac{t\_1}{a - -1}\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-269}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{1 + a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or -2.0000000000000001e-286 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.9999999999999998e-269Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
sum-to-multN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites76.4%
Applied rewrites69.2%
Taylor expanded in x around 0
lower-*.f6440.7
Applied rewrites40.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.0000000000000001e-286Initial program 75.1%
Taylor expanded in y around 0
lower-+.f6457.0
Applied rewrites57.0%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
metadata-evalN/A
lift--.f6457.0
Applied rewrites57.0%
if 3.9999999999999998e-269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 75.1%
Taylor expanded in y around 0
lower-+.f6457.0
Applied rewrites57.0%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6459.0
Applied rewrites59.0%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 75.1%
Taylor expanded in y around inf
lower-/.f6433.2
Applied rewrites33.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (/ (+ x (* z (/ y t))) (+ 1.0 a))))
(if (<= t_1 -2e-286)
t_2
(if (<= t_1 4e-269)
(* (/ (/ z t) b) t)
(if (<= t_1 INFINITY) t_2 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = (x + (z * (y / t))) / (1.0 + a);
double tmp;
if (t_1 <= -2e-286) {
tmp = t_2;
} else if (t_1 <= 4e-269) {
tmp = ((z / t) / b) * t;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = (x + (z * (y / t))) / (1.0 + a);
double tmp;
if (t_1 <= -2e-286) {
tmp = t_2;
} else if (t_1 <= 4e-269) {
tmp = ((z / t) / b) * t;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) t_2 = (x + (z * (y / t))) / (1.0 + a) tmp = 0 if t_1 <= -2e-286: tmp = t_2 elif t_1 <= 4e-269: tmp = ((z / t) / b) * t elif t_1 <= math.inf: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_2 = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(1.0 + a)) tmp = 0.0 if (t_1 <= -2e-286) tmp = t_2; elseif (t_1 <= 4e-269) tmp = Float64(Float64(Float64(z / t) / b) * t); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); t_2 = (x + (z * (y / t))) / (1.0 + a); tmp = 0.0; if (t_1 <= -2e-286) tmp = t_2; elseif (t_1 <= 4e-269) tmp = ((z / t) / b) * t; elseif (t_1 <= Inf) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-286], t$95$2, If[LessEqual[t$95$1, 4e-269], N[(N[(N[(z / t), $MachinePrecision] / b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_2 := \frac{x + z \cdot \frac{y}{t}}{1 + a}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-286}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{z}{t}}{b} \cdot t\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.0000000000000001e-286 or 3.9999999999999998e-269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 75.1%
Taylor expanded in y around 0
lower-+.f6457.0
Applied rewrites57.0%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6459.0
Applied rewrites59.0%
if -2.0000000000000001e-286 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.9999999999999998e-269Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
associate-/r/N/A
lower-*.f64N/A
Applied rewrites61.6%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6425.9
Applied rewrites25.9%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 75.1%
Taylor expanded in y around inf
lower-/.f6433.2
Applied rewrites33.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t))))
(t_3 (/ t_1 (- a -1.0))))
(if (<= t_2 -2e-286)
t_3
(if (<= t_2 4e-269)
(* (/ (/ z t) b) t)
(if (<= t_2 2e+267) t_3 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_3 = t_1 / (a - -1.0);
double tmp;
if (t_2 <= -2e-286) {
tmp = t_3;
} else if (t_2 <= 4e-269) {
tmp = ((z / t) / b) * t;
} else if (t_2 <= 2e+267) {
tmp = t_3;
} else {
tmp = z / b;
}
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, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x + ((y * z) / t)
t_2 = t_1 / ((a + 1.0d0) + ((y * b) / t))
t_3 = t_1 / (a - (-1.0d0))
if (t_2 <= (-2d-286)) then
tmp = t_3
else if (t_2 <= 4d-269) then
tmp = ((z / t) / b) * t
else if (t_2 <= 2d+267) then
tmp = t_3
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_3 = t_1 / (a - -1.0);
double tmp;
if (t_2 <= -2e-286) {
tmp = t_3;
} else if (t_2 <= 4e-269) {
tmp = ((z / t) / b) * t;
} else if (t_2 <= 2e+267) {
tmp = t_3;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / ((a + 1.0) + ((y * b) / t)) t_3 = t_1 / (a - -1.0) tmp = 0 if t_2 <= -2e-286: tmp = t_3 elif t_2 <= 4e-269: tmp = ((z / t) / b) * t elif t_2 <= 2e+267: tmp = t_3 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_3 = Float64(t_1 / Float64(a - -1.0)) tmp = 0.0 if (t_2 <= -2e-286) tmp = t_3; elseif (t_2 <= 4e-269) tmp = Float64(Float64(Float64(z / t) / b) * t); elseif (t_2 <= 2e+267) tmp = t_3; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / ((a + 1.0) + ((y * b) / t)); t_3 = t_1 / (a - -1.0); tmp = 0.0; if (t_2 <= -2e-286) tmp = t_3; elseif (t_2 <= 4e-269) tmp = ((z / t) / b) * t; elseif (t_2 <= 2e+267) tmp = t_3; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-286], t$95$3, If[LessEqual[t$95$2, 4e-269], N[(N[(N[(z / t), $MachinePrecision] / b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$2, 2e+267], t$95$3, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_3 := \frac{t\_1}{a - -1}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-286}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{z}{t}}{b} \cdot t\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+267}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.0000000000000001e-286 or 3.9999999999999998e-269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e267Initial program 75.1%
Taylor expanded in y around 0
lower-+.f6457.0
Applied rewrites57.0%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
metadata-evalN/A
lift--.f6457.0
Applied rewrites57.0%
if -2.0000000000000001e-286 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.9999999999999998e-269Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
associate-/r/N/A
lower-*.f64N/A
Applied rewrites61.6%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6425.9
Applied rewrites25.9%
if 1.9999999999999999e267 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 75.1%
Taylor expanded in y around inf
lower-/.f6433.2
Applied rewrites33.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (/ (fma y (/ z t) x) (- a -1.0))))
(if (<= t_1 -2e-286)
t_2
(if (<= t_1 4e-269)
(* (/ (/ z t) b) t)
(if (<= t_1 INFINITY) t_2 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = fma(y, (z / t), x) / (a - -1.0);
double tmp;
if (t_1 <= -2e-286) {
tmp = t_2;
} else if (t_1 <= 4e-269) {
tmp = ((z / t) / b) * t;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_2 = Float64(fma(y, Float64(z / t), x) / Float64(a - -1.0)) tmp = 0.0 if (t_1 <= -2e-286) tmp = t_2; elseif (t_1 <= 4e-269) tmp = Float64(Float64(Float64(z / t) / b) * t); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-286], t$95$2, If[LessEqual[t$95$1, 4e-269], N[(N[(N[(z / t), $MachinePrecision] / b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_2 := \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a - -1}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-286}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{z}{t}}{b} \cdot t\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.0000000000000001e-286 or 3.9999999999999998e-269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 75.1%
Taylor expanded in y around 0
lower-+.f6457.0
Applied rewrites57.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
lower-fma.f6457.1
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
metadata-evalN/A
lift--.f6457.1
Applied rewrites57.1%
if -2.0000000000000001e-286 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.9999999999999998e-269Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
associate-/r/N/A
lower-*.f64N/A
Applied rewrites61.6%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6425.9
Applied rewrites25.9%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 75.1%
Taylor expanded in y around inf
lower-/.f6433.2
Applied rewrites33.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (/ x (- a -1.0))))
(if (<= t_1 -2e-286)
t_2
(if (<= t_1 4e-269)
(* (/ (/ z t) b) t)
(if (<= t_1 2e+267) t_2 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = x / (a - -1.0);
double tmp;
if (t_1 <= -2e-286) {
tmp = t_2;
} else if (t_1 <= 4e-269) {
tmp = ((z / t) / b) * t;
} else if (t_1 <= 2e+267) {
tmp = t_2;
} else {
tmp = z / b;
}
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, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
t_2 = x / (a - (-1.0d0))
if (t_1 <= (-2d-286)) then
tmp = t_2
else if (t_1 <= 4d-269) then
tmp = ((z / t) / b) * t
else if (t_1 <= 2d+267) then
tmp = t_2
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = x / (a - -1.0);
double tmp;
if (t_1 <= -2e-286) {
tmp = t_2;
} else if (t_1 <= 4e-269) {
tmp = ((z / t) / b) * t;
} else if (t_1 <= 2e+267) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) t_2 = x / (a - -1.0) tmp = 0 if t_1 <= -2e-286: tmp = t_2 elif t_1 <= 4e-269: tmp = ((z / t) / b) * t elif t_1 <= 2e+267: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_2 = Float64(x / Float64(a - -1.0)) tmp = 0.0 if (t_1 <= -2e-286) tmp = t_2; elseif (t_1 <= 4e-269) tmp = Float64(Float64(Float64(z / t) / b) * t); elseif (t_1 <= 2e+267) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); t_2 = x / (a - -1.0); tmp = 0.0; if (t_1 <= -2e-286) tmp = t_2; elseif (t_1 <= 4e-269) tmp = ((z / t) / b) * t; elseif (t_1 <= 2e+267) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-286], t$95$2, If[LessEqual[t$95$1, 4e-269], N[(N[(N[(z / t), $MachinePrecision] / b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$1, 2e+267], t$95$2, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_2 := \frac{x}{a - -1}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-286}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-269}:\\
\;\;\;\;\frac{\frac{z}{t}}{b} \cdot t\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+267}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.0000000000000001e-286 or 3.9999999999999998e-269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e267Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
sum-to-multN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites76.4%
Taylor expanded in y around 0
lower-/.f64N/A
lower-+.f6443.1
Applied rewrites43.1%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
metadata-evalN/A
lift--.f6443.1
Applied rewrites43.1%
if -2.0000000000000001e-286 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.9999999999999998e-269Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
associate-/r/N/A
lower-*.f64N/A
Applied rewrites61.6%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/r*N/A
lower-/.f64N/A
lower-/.f6425.9
Applied rewrites25.9%
if 1.9999999999999999e267 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 75.1%
Taylor expanded in y around inf
lower-/.f6433.2
Applied rewrites33.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (/ x (- a -1.0))))
(if (<= t_1 -2e-286)
t_2
(if (<= t_1 4e-269) (/ z b) (if (<= t_1 2e+267) t_2 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = x / (a - -1.0);
double tmp;
if (t_1 <= -2e-286) {
tmp = t_2;
} else if (t_1 <= 4e-269) {
tmp = z / b;
} else if (t_1 <= 2e+267) {
tmp = t_2;
} else {
tmp = z / b;
}
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, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
t_2 = x / (a - (-1.0d0))
if (t_1 <= (-2d-286)) then
tmp = t_2
else if (t_1 <= 4d-269) then
tmp = z / b
else if (t_1 <= 2d+267) then
tmp = t_2
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = x / (a - -1.0);
double tmp;
if (t_1 <= -2e-286) {
tmp = t_2;
} else if (t_1 <= 4e-269) {
tmp = z / b;
} else if (t_1 <= 2e+267) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) t_2 = x / (a - -1.0) tmp = 0 if t_1 <= -2e-286: tmp = t_2 elif t_1 <= 4e-269: tmp = z / b elif t_1 <= 2e+267: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_2 = Float64(x / Float64(a - -1.0)) tmp = 0.0 if (t_1 <= -2e-286) tmp = t_2; elseif (t_1 <= 4e-269) tmp = Float64(z / b); elseif (t_1 <= 2e+267) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); t_2 = x / (a - -1.0); tmp = 0.0; if (t_1 <= -2e-286) tmp = t_2; elseif (t_1 <= 4e-269) tmp = z / b; elseif (t_1 <= 2e+267) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a - -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-286], t$95$2, If[LessEqual[t$95$1, 4e-269], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, 2e+267], t$95$2, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_2 := \frac{x}{a - -1}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-286}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-269}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+267}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.0000000000000001e-286 or 3.9999999999999998e-269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e267Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
sum-to-multN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites76.4%
Taylor expanded in y around 0
lower-/.f64N/A
lower-+.f6443.1
Applied rewrites43.1%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
metadata-evalN/A
lift--.f6443.1
Applied rewrites43.1%
if -2.0000000000000001e-286 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.9999999999999998e-269 or 1.9999999999999999e267 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 75.1%
Taylor expanded in y around inf
lower-/.f6433.2
Applied rewrites33.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -6.5e-75) (/ z b) (if (<= y 7e-88) (/ x a) (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.5e-75) {
tmp = z / b;
} else if (y <= 7e-88) {
tmp = x / a;
} else {
tmp = z / b;
}
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, b)
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), intent (in) :: b
real(8) :: tmp
if (y <= (-6.5d-75)) then
tmp = z / b
else if (y <= 7d-88) then
tmp = x / a
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6.5e-75) {
tmp = z / b;
} else if (y <= 7e-88) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6.5e-75: tmp = z / b elif y <= 7e-88: tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6.5e-75) tmp = Float64(z / b); elseif (y <= 7e-88) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -6.5e-75) tmp = z / b; elseif (y <= 7e-88) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6.5e-75], N[(z / b), $MachinePrecision], If[LessEqual[y, 7e-88], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{-75}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-88}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -6.5000000000000002e-75 or 7.0000000000000002e-88 < y Initial program 75.1%
Taylor expanded in y around inf
lower-/.f6433.2
Applied rewrites33.2%
if -6.5000000000000002e-75 < y < 7.0000000000000002e-88Initial program 75.1%
lift-/.f64N/A
lift-+.f64N/A
sum-to-multN/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites76.4%
Taylor expanded in y around 0
lower-/.f64N/A
lower-+.f6443.1
Applied rewrites43.1%
Taylor expanded in a around inf
lower-/.f6426.6
Applied rewrites26.6%
(FPCore (x y z t a b) :precision binary64 (/ z b))
double code(double x, double y, double z, double t, double a, double b) {
return z / b;
}
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, b)
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), intent (in) :: b
code = z / b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return z / b;
}
def code(x, y, z, t, a, b): return z / b
function code(x, y, z, t, a, b) return Float64(z / b) end
function tmp = code(x, y, z, t, a, b) tmp = z / b; end
code[x_, y_, z_, t_, a_, b_] := N[(z / b), $MachinePrecision]
\begin{array}{l}
\\
\frac{z}{b}
\end{array}
Initial program 75.1%
Taylor expanded in y around inf
lower-/.f6433.2
Applied rewrites33.2%
herbie shell --seed 2025149
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))