
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\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 z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (fma (/ (- z y) (+ (- t z) 1.0)) a x))
double code(double x, double y, double z, double t, double a) {
return fma(((z - y) / ((t - z) + 1.0)), a, x);
}
function code(x, y, z, t, a) return fma(Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0)), a, x) end
code[x_, y_, z_, t_, a_] := N[(N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{z - y}{\left(t - z\right) + 1}, a, x\right)
\end{array}
Initial program 98.1%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
Taylor expanded in z around 0
lower--.f6499.9
Applied rewrites99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- z y) t) a x)))
(if (<= t -3.8e+64)
t_1
(if (<= t -7.8e-130)
(- x (* (/ y (- 1.0 z)) a))
(if (<= t 105000000000.0) (fma (/ z (- 1.0 z)) a x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((z - y) / t), a, x);
double tmp;
if (t <= -3.8e+64) {
tmp = t_1;
} else if (t <= -7.8e-130) {
tmp = x - ((y / (1.0 - z)) * a);
} else if (t <= 105000000000.0) {
tmp = fma((z / (1.0 - z)), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(z - y) / t), a, x) tmp = 0.0 if (t <= -3.8e+64) tmp = t_1; elseif (t <= -7.8e-130) tmp = Float64(x - Float64(Float64(y / Float64(1.0 - z)) * a)); elseif (t <= 105000000000.0) tmp = fma(Float64(z / Float64(1.0 - z)), a, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision] * a + x), $MachinePrecision]}, If[LessEqual[t, -3.8e+64], t$95$1, If[LessEqual[t, -7.8e-130], N[(x - N[(N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 105000000000.0], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-130}:\\
\;\;\;\;x - \frac{y}{1 - z} \cdot a\\
\mathbf{elif}\;t \leq 105000000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.8000000000000001e64 or 1.05e11 < t Initial program 98.0%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6489.6
Applied rewrites89.6%
if -3.8000000000000001e64 < t < -7.8000000000000002e-130Initial program 100.0%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6489.9
Applied rewrites89.9%
Taylor expanded in t around 0
Applied rewrites84.6%
if -7.8000000000000002e-130 < t < 1.05e11Initial program 97.5%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6477.7
Applied rewrites77.7%
Taylor expanded in t around 0
Applied rewrites77.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ y t) a))))
(if (<= t -4.8e-59)
t_1
(if (<= t -8e-106)
(fma (fma (- 1.0 y) z (- y)) a x)
(if (<= t 5e+33) (fma (/ z (- 1.0 z)) a x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y / t) * a);
double tmp;
if (t <= -4.8e-59) {
tmp = t_1;
} else if (t <= -8e-106) {
tmp = fma(fma((1.0 - y), z, -y), a, x);
} else if (t <= 5e+33) {
tmp = fma((z / (1.0 - z)), a, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y / t) * a)) tmp = 0.0 if (t <= -4.8e-59) tmp = t_1; elseif (t <= -8e-106) tmp = fma(fma(Float64(1.0 - y), z, Float64(-y)), a, x); elseif (t <= 5e+33) tmp = fma(Float64(z / Float64(1.0 - z)), a, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e-59], t$95$1, If[LessEqual[t, -8e-106], N[(N[(N[(1.0 - y), $MachinePrecision] * z + (-y)), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[t, 5e+33], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{t} \cdot a\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-106}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.8000000000000003e-59 or 4.99999999999999973e33 < t Initial program 98.3%
Taylor expanded in y around inf
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6488.2
Applied rewrites88.2%
Taylor expanded in t around inf
Applied rewrites85.7%
if -4.8000000000000003e-59 < t < -7.99999999999999953e-106Initial program 99.9%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f64100.0
lift-+.f64N/A
+-commutativeN/A
lower-+.f64100.0
Applied rewrites100.0%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f64100.0
lift-+.f64N/A
+-commutativeN/A
lower-+.f64100.0
Applied rewrites100.0%
Taylor expanded in t around 0
lower-/.f64N/A
lower--.f64N/A
lower--.f64100.0
Applied rewrites100.0%
Taylor expanded in z around 0
Applied rewrites92.4%
if -7.99999999999999953e-106 < t < 4.99999999999999973e33Initial program 97.7%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6477.8
Applied rewrites77.8%
Taylor expanded in t around 0
Applied rewrites77.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.4e+65) (not (<= t 190000000000.0))) (fma (/ (- z y) t) a x) (fma (/ (- z y) (- 1.0 z)) a x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.4e+65) || !(t <= 190000000000.0)) {
tmp = fma(((z - y) / t), a, x);
} else {
tmp = fma(((z - y) / (1.0 - z)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.4e+65) || !(t <= 190000000000.0)) tmp = fma(Float64(Float64(z - y) / t), a, x); else tmp = fma(Float64(Float64(z - y) / Float64(1.0 - z)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.4e+65], N[Not[LessEqual[t, 190000000000.0]], $MachinePrecision]], N[(N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision] * a + x), $MachinePrecision], N[(N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.4 \cdot 10^{+65} \lor \neg \left(t \leq 190000000000\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - y}{1 - z}, a, x\right)\\
\end{array}
\end{array}
if t < -3.3999999999999999e65 or 1.9e11 < t Initial program 98.0%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6490.4
Applied rewrites90.4%
if -3.3999999999999999e65 < t < 1.9e11Initial program 98.1%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
Taylor expanded in t around 0
lower-/.f64N/A
lower--.f64N/A
lower--.f6498.1
Applied rewrites98.1%
Final simplification95.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -0.00041) (not (<= z 2.9e-15))) (fma (/ z (- (+ 1.0 t) z)) a x) (fma (/ y (- -1.0 t)) a x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.00041) || !(z <= 2.9e-15)) {
tmp = fma((z / ((1.0 + t) - z)), a, x);
} else {
tmp = fma((y / (-1.0 - t)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -0.00041) || !(z <= 2.9e-15)) tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x); else tmp = fma(Float64(y / Float64(-1.0 - t)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.00041], N[Not[LessEqual[z, 2.9e-15]], $MachinePrecision]], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00041 \lor \neg \left(z \leq 2.9 \cdot 10^{-15}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{-1 - t}, a, x\right)\\
\end{array}
\end{array}
if z < -4.0999999999999999e-4 or 2.90000000000000019e-15 < z Initial program 97.0%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6489.1
Applied rewrites89.1%
if -4.0999999999999999e-4 < z < 2.90000000000000019e-15Initial program 99.1%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f64100.0
lift-+.f64N/A
+-commutativeN/A
lower-+.f64100.0
Applied rewrites100.0%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-+.f6493.4
Applied rewrites93.4%
Final simplification91.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -0.00041) (not (<= z 2.9e-15))) (fma z (/ a (+ (- t z) 1.0)) x) (fma (/ y (- -1.0 t)) a x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.00041) || !(z <= 2.9e-15)) {
tmp = fma(z, (a / ((t - z) + 1.0)), x);
} else {
tmp = fma((y / (-1.0 - t)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -0.00041) || !(z <= 2.9e-15)) tmp = fma(z, Float64(a / Float64(Float64(t - z) + 1.0)), x); else tmp = fma(Float64(y / Float64(-1.0 - t)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.00041], N[Not[LessEqual[z, 2.9e-15]], $MachinePrecision]], N[(z * N[(a / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.00041 \lor \neg \left(z \leq 2.9 \cdot 10^{-15}\right):\\
\;\;\;\;\mathsf{fma}\left(z, \frac{a}{\left(t - z\right) + 1}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{-1 - t}, a, x\right)\\
\end{array}
\end{array}
if z < -4.0999999999999999e-4 or 2.90000000000000019e-15 < z Initial program 97.0%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6489.1
Applied rewrites89.1%
Applied rewrites87.4%
if -4.0999999999999999e-4 < z < 2.90000000000000019e-15Initial program 99.1%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f64100.0
lift-+.f64N/A
+-commutativeN/A
lower-+.f64100.0
Applied rewrites100.0%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-+.f6493.4
Applied rewrites93.4%
Final simplification90.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.0075) (fma (/ z (- 1.0 z)) a x) (if (<= z 7.6e+18) (- x (* (/ y (+ 1.0 t)) a)) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.0075) {
tmp = fma((z / (1.0 - z)), a, x);
} else if (z <= 7.6e+18) {
tmp = x - ((y / (1.0 + t)) * a);
} else {
tmp = x - a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.0075) tmp = fma(Float64(z / Float64(1.0 - z)), a, x); elseif (z <= 7.6e+18) tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); else tmp = Float64(x - a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.0075], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, 7.6e+18], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0075:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+18}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -0.0074999999999999997Initial program 97.5%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6488.1
Applied rewrites88.1%
Taylor expanded in t around 0
Applied rewrites84.7%
if -0.0074999999999999997 < z < 7.6e18Initial program 99.2%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6491.7
Applied rewrites91.7%
if 7.6e18 < z Initial program 96.1%
Taylor expanded in z around inf
lower--.f6483.3
Applied rewrites83.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.6e+65) (not (<= t 105000000000.0))) (fma (/ (- z y) t) a x) (fma (/ z (- 1.0 z)) a x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.6e+65) || !(t <= 105000000000.0)) {
tmp = fma(((z - y) / t), a, x);
} else {
tmp = fma((z / (1.0 - z)), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.6e+65) || !(t <= 105000000000.0)) tmp = fma(Float64(Float64(z - y) / t), a, x); else tmp = fma(Float64(z / Float64(1.0 - z)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.6e+65], N[Not[LessEqual[t, 105000000000.0]], $MachinePrecision]], N[(N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision] * a + x), $MachinePrecision], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+65} \lor \neg \left(t \leq 105000000000\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\end{array}
\end{array}
if t < -3.59999999999999978e65 or 1.05e11 < t Initial program 98.0%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6489.6
Applied rewrites89.6%
if -3.59999999999999978e65 < t < 1.05e11Initial program 98.1%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6476.5
Applied rewrites76.5%
Taylor expanded in t around 0
Applied rewrites76.0%
Final simplification81.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.0075) (fma (/ z (- 1.0 z)) a x) (if (<= z 7.6e+18) (fma (/ y (- -1.0 t)) a x) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.0075) {
tmp = fma((z / (1.0 - z)), a, x);
} else if (z <= 7.6e+18) {
tmp = fma((y / (-1.0 - t)), a, x);
} else {
tmp = x - a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.0075) tmp = fma(Float64(z / Float64(1.0 - z)), a, x); elseif (z <= 7.6e+18) tmp = fma(Float64(y / Float64(-1.0 - t)), a, x); else tmp = Float64(x - a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.0075], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, 7.6e+18], N[(N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0075:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+18}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{-1 - t}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -0.0074999999999999997Initial program 97.5%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6488.1
Applied rewrites88.1%
Taylor expanded in t around 0
Applied rewrites84.7%
if -0.0074999999999999997 < z < 7.6e18Initial program 99.2%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
Taylor expanded in z around 0
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-+.f6491.7
Applied rewrites91.7%
if 7.6e18 < z Initial program 96.1%
Taylor expanded in z around inf
lower--.f6483.3
Applied rewrites83.3%
Final simplification88.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -0.98) (not (<= z 8e-6))) (- x a) (fma (fma (- 1.0 y) z (- y)) a x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -0.98) || !(z <= 8e-6)) {
tmp = x - a;
} else {
tmp = fma(fma((1.0 - y), z, -y), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -0.98) || !(z <= 8e-6)) tmp = Float64(x - a); else tmp = fma(fma(Float64(1.0 - y), z, Float64(-y)), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.98], N[Not[LessEqual[z, 8e-6]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(N[(N[(1.0 - y), $MachinePrecision] * z + (-y)), $MachinePrecision] * a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.98 \lor \neg \left(z \leq 8 \cdot 10^{-6}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\
\end{array}
\end{array}
if z < -0.97999999999999998 or 7.99999999999999964e-6 < z Initial program 96.9%
Taylor expanded in z around inf
lower--.f6482.2
Applied rewrites82.2%
if -0.97999999999999998 < z < 7.99999999999999964e-6Initial program 99.1%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
lower-*.f64N/A
lower-/.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lower-neg.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
Applied rewrites99.9%
Taylor expanded in t around 0
lower-/.f64N/A
lower--.f64N/A
lower--.f6473.9
Applied rewrites73.9%
Taylor expanded in z around 0
Applied rewrites73.3%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.4e+14) (not (<= z 8e-6))) (- x a) (fma (/ z 1.0) a x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.4e+14) || !(z <= 8e-6)) {
tmp = x - a;
} else {
tmp = fma((z / 1.0), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.4e+14) || !(z <= 8e-6)) tmp = Float64(x - a); else tmp = fma(Float64(z / 1.0), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.4e+14], N[Not[LessEqual[z, 8e-6]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(N[(z / 1.0), $MachinePrecision] * a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+14} \lor \neg \left(z \leq 8 \cdot 10^{-6}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1}, a, x\right)\\
\end{array}
\end{array}
if z < -2.4e14 or 7.99999999999999964e-6 < z Initial program 96.9%
Taylor expanded in z around inf
lower--.f6482.9
Applied rewrites82.9%
if -2.4e14 < z < 7.99999999999999964e-6Initial program 99.1%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6466.0
Applied rewrites66.0%
Taylor expanded in t around 0
Applied rewrites61.6%
Taylor expanded in z around 0
Applied rewrites61.1%
Final simplification71.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.4e-27) (not (<= z 1.65e-48))) (- x a) (fma (/ z t) a x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.4e-27) || !(z <= 1.65e-48)) {
tmp = x - a;
} else {
tmp = fma((z / t), a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.4e-27) || !(z <= 1.65e-48)) tmp = Float64(x - a); else tmp = fma(Float64(z / t), a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.4e-27], N[Not[LessEqual[z, 1.65e-48]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(N[(z / t), $MachinePrecision] * a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-27} \lor \neg \left(z \leq 1.65 \cdot 10^{-48}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, a, x\right)\\
\end{array}
\end{array}
if z < -3.3999999999999997e-27 or 1.65e-48 < z Initial program 97.2%
Taylor expanded in z around inf
lower--.f6475.8
Applied rewrites75.8%
if -3.3999999999999997e-27 < z < 1.65e-48Initial program 99.1%
Taylor expanded in y around 0
fp-cancel-sub-sign-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6469.0
Applied rewrites69.0%
Taylor expanded in t around inf
Applied rewrites60.1%
Final simplification68.4%
(FPCore (x y z t a) :precision binary64 (- x a))
double code(double x, double y, double z, double t, double a) {
return x - a;
}
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 - a
end function
public static double code(double x, double y, double z, double t, double a) {
return x - a;
}
def code(x, y, z, t, a): return x - a
function code(x, y, z, t, a) return Float64(x - a) end
function tmp = code(x, y, z, t, a) tmp = x - a; end
code[x_, y_, z_, t_, a_] := N[(x - a), $MachinePrecision]
\begin{array}{l}
\\
x - a
\end{array}
Initial program 98.1%
Taylor expanded in z around inf
lower--.f6461.8
Applied rewrites61.8%
(FPCore (x y z t a) :precision binary64 (- a))
double code(double x, double y, double z, double t, double a) {
return -a;
}
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 = -a
end function
public static double code(double x, double y, double z, double t, double a) {
return -a;
}
def code(x, y, z, t, a): return -a
function code(x, y, z, t, a) return Float64(-a) end
function tmp = code(x, y, z, t, a) tmp = -a; end
code[x_, y_, z_, t_, a_] := (-a)
\begin{array}{l}
\\
-a
\end{array}
Initial program 98.1%
Taylor expanded in z around inf
lower--.f6461.8
Applied rewrites61.8%
Taylor expanded in x around 0
Applied rewrites17.2%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
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 - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024363
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))