
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.6e+193) (not (<= t 3.8e+108))) (fma (+ (/ a t) 1.0) (* (- y x) (/ (fma z -1.0 a) t)) y) (fma (/ (- z t) (- a t)) (- y x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.6e+193) || !(t <= 3.8e+108)) {
tmp = fma(((a / t) + 1.0), ((y - x) * (fma(z, -1.0, a) / t)), y);
} else {
tmp = fma(((z - t) / (a - t)), (y - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.6e+193) || !(t <= 3.8e+108)) tmp = fma(Float64(Float64(a / t) + 1.0), Float64(Float64(y - x) * Float64(fma(z, -1.0, a) / t)), y); else tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.6e+193], N[Not[LessEqual[t, 3.8e+108]], $MachinePrecision]], N[(N[(N[(a / t), $MachinePrecision] + 1.0), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * N[(N[(z * -1.0 + a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+193} \lor \neg \left(t \leq 3.8 \cdot 10^{+108}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{t} + 1, \left(y - x\right) \cdot \frac{\mathsf{fma}\left(z, -1, a\right)}{t}, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\end{array}
\end{array}
if t < -1.60000000000000007e193 or 3.80000000000000008e108 < t Initial program 35.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites91.2%
Taylor expanded in t around inf
Applied rewrites94.5%
Applied rewrites94.5%
if -1.60000000000000007e193 < t < 3.80000000000000008e108Initial program 81.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6492.1
Applied rewrites92.1%
Final simplification92.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ y a) x))
(t_2 (fma 1.0 (- y x) x))
(t_3 (/ (* (- x y) z) t)))
(if (<= t -1.45e+172)
t_2
(if (<= t -7.8e+21)
t_1
(if (<= t -1.66e-41)
t_3
(if (<= t 7.2e-106)
(fma (/ (- y x) a) z x)
(if (<= t 3.2e-41) t_3 (if (<= t 1.6e+127) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), (y / a), x);
double t_2 = fma(1.0, (y - x), x);
double t_3 = ((x - y) * z) / t;
double tmp;
if (t <= -1.45e+172) {
tmp = t_2;
} else if (t <= -7.8e+21) {
tmp = t_1;
} else if (t <= -1.66e-41) {
tmp = t_3;
} else if (t <= 7.2e-106) {
tmp = fma(((y - x) / a), z, x);
} else if (t <= 3.2e-41) {
tmp = t_3;
} else if (t <= 1.6e+127) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(y / a), x) t_2 = fma(1.0, Float64(y - x), x) t_3 = Float64(Float64(Float64(x - y) * z) / t) tmp = 0.0 if (t <= -1.45e+172) tmp = t_2; elseif (t <= -7.8e+21) tmp = t_1; elseif (t <= -1.66e-41) tmp = t_3; elseif (t <= 7.2e-106) tmp = fma(Float64(Float64(y - x) / a), z, x); elseif (t <= 3.2e-41) tmp = t_3; elseif (t <= 1.6e+127) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x - y), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -1.45e+172], t$95$2, If[LessEqual[t, -7.8e+21], t$95$1, If[LessEqual[t, -1.66e-41], t$95$3, If[LessEqual[t, 7.2e-106], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, 3.2e-41], t$95$3, If[LessEqual[t, 1.6e+127], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
t_2 := \mathsf{fma}\left(1, y - x, x\right)\\
t_3 := \frac{\left(x - y\right) \cdot z}{t}\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+172}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.66 \cdot 10^{-41}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-106}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-41}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+127}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.45e172 or 1.59999999999999988e127 < t Initial program 36.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6465.5
Applied rewrites65.5%
Taylor expanded in t around inf
Applied rewrites47.1%
if -1.45e172 < t < -7.8e21 or 3.20000000000000012e-41 < t < 1.59999999999999988e127Initial program 64.7%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6449.0
Applied rewrites49.0%
Taylor expanded in x around 0
Applied rewrites49.3%
if -7.8e21 < t < -1.65999999999999993e-41 or 7.20000000000000025e-106 < t < 3.20000000000000012e-41Initial program 88.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6485.0
Applied rewrites85.0%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.8
Applied rewrites84.8%
Taylor expanded in z around inf
Applied rewrites69.3%
if -1.65999999999999993e-41 < t < 7.20000000000000025e-106Initial program 92.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6483.9
Applied rewrites83.9%
Final simplification61.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.1e-41)
(fma (/ (fma -1.0 y x) t) (- z a) y)
(if (<= t 6.8e-106)
(fma (/ (- z t) a) (- y x) x)
(if (<= t 1e+49)
(+ x (/ (* (- z t) y) (- a t)))
(- y (* (/ (- y x) t) (- z a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.1e-41) {
tmp = fma((fma(-1.0, y, x) / t), (z - a), y);
} else if (t <= 6.8e-106) {
tmp = fma(((z - t) / a), (y - x), x);
} else if (t <= 1e+49) {
tmp = x + (((z - t) * y) / (a - t));
} else {
tmp = y - (((y - x) / t) * (z - a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.1e-41) tmp = fma(Float64(fma(-1.0, y, x) / t), Float64(z - a), y); elseif (t <= 6.8e-106) tmp = fma(Float64(Float64(z - t) / a), Float64(y - x), x); elseif (t <= 1e+49) tmp = Float64(x + Float64(Float64(Float64(z - t) * y) / Float64(a - t))); else tmp = Float64(y - Float64(Float64(Float64(y - x) / t) * Float64(z - a))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.1e-41], N[(N[(N[(-1.0 * y + x), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 6.8e-106], N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1e+49], N[(x + N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-41}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(-1, y, x\right)}{t}, z - a, y\right)\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-106}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a}, y - x, x\right)\\
\mathbf{elif}\;t \leq 10^{+49}:\\
\;\;\;\;x + \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\right)\\
\end{array}
\end{array}
if t < -1.1e-41Initial program 56.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites74.2%
if -1.1e-41 < t < 6.79999999999999965e-106Initial program 92.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6498.7
Applied rewrites98.7%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6491.9
Applied rewrites91.9%
if 6.79999999999999965e-106 < t < 9.99999999999999946e48Initial program 78.2%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.9
Applied rewrites70.9%
if 9.99999999999999946e48 < t Initial program 43.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6474.5
Applied rewrites74.5%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6488.2
Applied rewrites88.2%
Final simplification82.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (* (/ (- y x) t) (- z a)))))
(if (<= t -1.1e-41)
t_1
(if (<= t 6.8e-106)
(fma (/ (- z t) a) (- y x) x)
(if (<= t 1e+49) (+ x (/ (* (- z t) y) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - (((y - x) / t) * (z - a));
double tmp;
if (t <= -1.1e-41) {
tmp = t_1;
} else if (t <= 6.8e-106) {
tmp = fma(((z - t) / a), (y - x), x);
} else if (t <= 1e+49) {
tmp = x + (((z - t) * y) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y - Float64(Float64(Float64(y - x) / t) * Float64(z - a))) tmp = 0.0 if (t <= -1.1e-41) tmp = t_1; elseif (t <= 6.8e-106) tmp = fma(Float64(Float64(z - t) / a), Float64(y - x), x); elseif (t <= 1e+49) tmp = Float64(x + Float64(Float64(Float64(z - t) * y) / Float64(a - t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e-41], t$95$1, If[LessEqual[t, 6.8e-106], N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1e+49], N[(x + N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{y - x}{t} \cdot \left(z - a\right)\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-106}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a}, y - x, x\right)\\
\mathbf{elif}\;t \leq 10^{+49}:\\
\;\;\;\;x + \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1e-41 or 9.99999999999999946e48 < t Initial program 51.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6474.9
Applied rewrites74.9%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6479.5
Applied rewrites79.5%
if -1.1e-41 < t < 6.79999999999999965e-106Initial program 92.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6498.7
Applied rewrites98.7%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6491.9
Applied rewrites91.9%
if 6.79999999999999965e-106 < t < 9.99999999999999946e48Initial program 78.2%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f6470.9
Applied rewrites70.9%
Final simplification82.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (* (/ (- y x) t) (- z a)))))
(if (<= t -1.1e-41)
t_1
(if (<= t 9.2e-109)
(fma (/ (- z t) a) (- y x) x)
(if (<= t 14500000000.0) (+ x (/ (* (- y x) z) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - (((y - x) / t) * (z - a));
double tmp;
if (t <= -1.1e-41) {
tmp = t_1;
} else if (t <= 9.2e-109) {
tmp = fma(((z - t) / a), (y - x), x);
} else if (t <= 14500000000.0) {
tmp = x + (((y - x) * z) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(y - Float64(Float64(Float64(y - x) / t) * Float64(z - a))) tmp = 0.0 if (t <= -1.1e-41) tmp = t_1; elseif (t <= 9.2e-109) tmp = fma(Float64(Float64(z - t) / a), Float64(y - x), x); elseif (t <= 14500000000.0) tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / Float64(a - t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e-41], t$95$1, If[LessEqual[t, 9.2e-109], N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 14500000000.0], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{y - x}{t} \cdot \left(z - a\right)\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-109}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a}, y - x, x\right)\\
\mathbf{elif}\;t \leq 14500000000:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1e-41 or 1.45e10 < t Initial program 52.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6475.6
Applied rewrites75.6%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6477.2
Applied rewrites77.2%
if -1.1e-41 < t < 9.2000000000000006e-109Initial program 91.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6498.6
Applied rewrites98.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6491.7
Applied rewrites91.7%
if 9.2000000000000006e-109 < t < 1.45e10Initial program 87.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6476.5
Applied rewrites76.5%
Final simplification81.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -7.2e+225) (not (<= t 3.8e+108))) (- y (* (/ (- y x) t) (- z a))) (fma (/ (- z t) (- a t)) (- y x) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -7.2e+225) || !(t <= 3.8e+108)) {
tmp = y - (((y - x) / t) * (z - a));
} else {
tmp = fma(((z - t) / (a - t)), (y - x), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -7.2e+225) || !(t <= 3.8e+108)) tmp = Float64(y - Float64(Float64(Float64(y - x) / t) * Float64(z - a))); else tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.2e+225], N[Not[LessEqual[t, 3.8e+108]], $MachinePrecision]], N[(y - N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+225} \lor \neg \left(t \leq 3.8 \cdot 10^{+108}\right):\\
\;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
\end{array}
\end{array}
if t < -7.1999999999999996e225 or 3.80000000000000008e108 < t Initial program 31.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6460.3
Applied rewrites60.3%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.8
Applied rewrites97.8%
if -7.1999999999999996e225 < t < 3.80000000000000008e108Initial program 78.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.0
Applied rewrites91.0%
Final simplification92.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ y a) x)))
(if (<= a -1.15e+82)
t_1
(if (<= a -4.25e-7)
(fma (/ (- y x) a) z x)
(if (<= a 8e+40) (fma (/ (- x y) t) z y) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), (y / a), x);
double tmp;
if (a <= -1.15e+82) {
tmp = t_1;
} else if (a <= -4.25e-7) {
tmp = fma(((y - x) / a), z, x);
} else if (a <= 8e+40) {
tmp = fma(((x - y) / t), z, y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(y / a), x) tmp = 0.0 if (a <= -1.15e+82) tmp = t_1; elseif (a <= -4.25e-7) tmp = fma(Float64(Float64(y - x) / a), z, x); elseif (a <= 8e+40) tmp = fma(Float64(Float64(x - y) / t), z, y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.15e+82], t$95$1, If[LessEqual[a, -4.25e-7], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[a, 8e+40], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4.25 \cdot 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.14999999999999994e82 or 8.00000000000000024e40 < a Initial program 67.9%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6475.5
Applied rewrites75.5%
Taylor expanded in x around 0
Applied rewrites71.5%
if -1.14999999999999994e82 < a < -4.25000000000000007e-7Initial program 73.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6458.6
Applied rewrites58.6%
if -4.25000000000000007e-7 < a < 8.00000000000000024e40Initial program 67.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6477.4
Applied rewrites77.4%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in a around 0
Applied rewrites81.1%
Final simplification75.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ y a) x)))
(if (<= a -4e-29)
t_1
(if (<= a 4.6e-117)
(/ (* (- x y) z) t)
(if (<= a 1.7e+23) (fma 1.0 (- y x) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), (y / a), x);
double tmp;
if (a <= -4e-29) {
tmp = t_1;
} else if (a <= 4.6e-117) {
tmp = ((x - y) * z) / t;
} else if (a <= 1.7e+23) {
tmp = fma(1.0, (y - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(y / a), x) tmp = 0.0 if (a <= -4e-29) tmp = t_1; elseif (a <= 4.6e-117) tmp = Float64(Float64(Float64(x - y) * z) / t); elseif (a <= 1.7e+23) tmp = fma(1.0, Float64(y - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -4e-29], t$95$1, If[LessEqual[a, 4.6e-117], N[(N[(N[(x - y), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, 1.7e+23], N[(1.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\mathbf{if}\;a \leq -4 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-117}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot z}{t}\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+23}:\\
\;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.99999999999999977e-29 or 1.69999999999999996e23 < a Initial program 68.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6472.0
Applied rewrites72.0%
Taylor expanded in x around 0
Applied rewrites63.4%
if -3.99999999999999977e-29 < a < 4.59999999999999989e-117Initial program 69.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6478.0
Applied rewrites78.0%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.9
Applied rewrites84.9%
Taylor expanded in z around inf
Applied rewrites48.7%
if 4.59999999999999989e-117 < a < 1.69999999999999996e23Initial program 59.9%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6477.0
Applied rewrites77.0%
Taylor expanded in t around inf
Applied rewrites45.1%
Final simplification56.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.4e-6) (not (<= a 2.5e+23))) (fma (/ (- z t) a) (- y x) x) (- y (* (/ (- y x) t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.4e-6) || !(a <= 2.5e+23)) {
tmp = fma(((z - t) / a), (y - x), x);
} else {
tmp = y - (((y - x) / t) * (z - a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.4e-6) || !(a <= 2.5e+23)) tmp = fma(Float64(Float64(z - t) / a), Float64(y - x), x); else tmp = Float64(y - Float64(Float64(Float64(y - x) / t) * Float64(z - a))); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.4e-6], N[Not[LessEqual[a, 2.5e+23]], $MachinePrecision]], N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(y - N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-6} \lor \neg \left(a \leq 2.5 \cdot 10^{+23}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;y - \frac{y - x}{t} \cdot \left(z - a\right)\\
\end{array}
\end{array}
if a < -4.4000000000000002e-6 or 2.5e23 < a Initial program 68.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6490.4
Applied rewrites90.4%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6474.8
Applied rewrites74.8%
if -4.4000000000000002e-6 < a < 2.5e23Initial program 67.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6477.6
Applied rewrites77.6%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.5
Applied rewrites85.5%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.4e-6) (not (<= a 2.45e+23))) (fma (/ (- z t) a) (- y x) x) (fma (/ (- x y) t) z y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.4e-6) || !(a <= 2.45e+23)) {
tmp = fma(((z - t) / a), (y - x), x);
} else {
tmp = fma(((x - y) / t), z, y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.4e-6) || !(a <= 2.45e+23)) tmp = fma(Float64(Float64(z - t) / a), Float64(y - x), x); else tmp = fma(Float64(Float64(x - y) / t), z, y); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.4e-6], N[Not[LessEqual[a, 2.45e+23]], $MachinePrecision]], N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-6} \lor \neg \left(a \leq 2.45 \cdot 10^{+23}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z - t}{a}, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\end{array}
\end{array}
if a < -4.4000000000000002e-6 or 2.4500000000000001e23 < a Initial program 68.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6490.4
Applied rewrites90.4%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6474.8
Applied rewrites74.8%
if -4.4000000000000002e-6 < a < 2.4500000000000001e23Initial program 67.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6477.6
Applied rewrites77.6%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.5
Applied rewrites85.5%
Taylor expanded in a around 0
Applied rewrites81.6%
Final simplification78.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.4e-6) (not (<= a 2.45e+23))) (fma (- z t) (/ (- y x) a) x) (fma (/ (- x y) t) z y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.4e-6) || !(a <= 2.45e+23)) {
tmp = fma((z - t), ((y - x) / a), x);
} else {
tmp = fma(((x - y) / t), z, y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.4e-6) || !(a <= 2.45e+23)) tmp = fma(Float64(z - t), Float64(Float64(y - x) / a), x); else tmp = fma(Float64(Float64(x - y) / t), z, y); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.4e-6], N[Not[LessEqual[a, 2.45e+23]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-6} \lor \neg \left(a \leq 2.45 \cdot 10^{+23}\right):\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\end{array}
\end{array}
if a < -4.4000000000000002e-6 or 2.4500000000000001e23 < a Initial program 68.8%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6473.4
Applied rewrites73.4%
if -4.4000000000000002e-6 < a < 2.4500000000000001e23Initial program 67.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6477.6
Applied rewrites77.6%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.5
Applied rewrites85.5%
Taylor expanded in a around 0
Applied rewrites81.6%
Final simplification77.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma 1.0 (- y x) x)))
(if (<= t -1.18e+182)
t_1
(if (<= t -1.65e-63)
(* (/ z t) x)
(if (<= t 2.1e+29) (/ (* y z) a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(1.0, (y - x), x);
double tmp;
if (t <= -1.18e+182) {
tmp = t_1;
} else if (t <= -1.65e-63) {
tmp = (z / t) * x;
} else if (t <= 2.1e+29) {
tmp = (y * z) / a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(1.0, Float64(y - x), x) tmp = 0.0 if (t <= -1.18e+182) tmp = t_1; elseif (t <= -1.65e-63) tmp = Float64(Float64(z / t) * x); elseif (t <= 2.1e+29) tmp = Float64(Float64(y * z) / a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(1.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -1.18e+182], t$95$1, If[LessEqual[t, -1.65e-63], N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 2.1e+29], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(1, y - x, x\right)\\
\mathbf{if}\;t \leq -1.18 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-63}:\\
\;\;\;\;\frac{z}{t} \cdot x\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+29}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1799999999999999e182 or 2.1000000000000002e29 < t Initial program 41.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6470.1
Applied rewrites70.1%
Taylor expanded in t around inf
Applied rewrites40.3%
if -1.1799999999999999e182 < t < -1.64999999999999997e-63Initial program 70.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6486.2
Applied rewrites86.2%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6464.1
Applied rewrites64.1%
Taylor expanded in x around inf
Applied rewrites34.9%
Taylor expanded in z around inf
Applied rewrites33.2%
if -1.64999999999999997e-63 < t < 2.1000000000000002e29Initial program 90.2%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.2
Applied rewrites72.2%
Taylor expanded in x around 0
Applied rewrites25.2%
Final simplification32.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.25e-7) (fma (/ z a) (- y x) x) (if (<= a 8e+40) (fma (/ (- x y) t) z y) (fma (- z t) (/ y a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.25e-7) {
tmp = fma((z / a), (y - x), x);
} else if (a <= 8e+40) {
tmp = fma(((x - y) / t), z, y);
} else {
tmp = fma((z - t), (y / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.25e-7) tmp = fma(Float64(z / a), Float64(y - x), x); elseif (a <= 8e+40) tmp = fma(Float64(Float64(x - y) / t), z, y); else tmp = fma(Float64(z - t), Float64(y / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.25e-7], N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 8e+40], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.25 \cdot 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\
\mathbf{elif}\;a \leq 8 \cdot 10^{+40}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\
\end{array}
\end{array}
if a < -4.25000000000000007e-7Initial program 69.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6489.4
Applied rewrites89.4%
Taylor expanded in t around 0
lower-/.f6463.6
Applied rewrites63.6%
if -4.25000000000000007e-7 < a < 8.00000000000000024e40Initial program 67.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6477.4
Applied rewrites77.4%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in a around 0
Applied rewrites81.1%
if 8.00000000000000024e40 < a Initial program 68.4%
Taylor expanded in a around inf
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6475.3
Applied rewrites75.3%
Taylor expanded in x around 0
Applied rewrites71.4%
Final simplification74.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.2e-43) (not (<= a 3.7e+15))) (fma (/ y a) z x) (/ (* (- x y) z) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.2e-43) || !(a <= 3.7e+15)) {
tmp = fma((y / a), z, x);
} else {
tmp = ((x - y) * z) / t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.2e-43) || !(a <= 3.7e+15)) tmp = fma(Float64(y / a), z, x); else tmp = Float64(Float64(Float64(x - y) * z) / t); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.2e-43], N[Not[LessEqual[a, 3.7e+15]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-43} \lor \neg \left(a \leq 3.7 \cdot 10^{+15}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot z}{t}\\
\end{array}
\end{array}
if a < -5.2e-43 or 3.7e15 < a Initial program 68.7%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6463.3
Applied rewrites63.3%
Taylor expanded in x around 0
Applied rewrites54.6%
if -5.2e-43 < a < 3.7e15Initial program 67.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6478.1
Applied rewrites78.1%
Taylor expanded in t around inf
fp-cancel-sub-sign-invN/A
metadata-evalN/A
*-lft-identityN/A
fp-cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l-N/A
div-subN/A
lower--.f64N/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.8
Applied rewrites85.8%
Taylor expanded in z around inf
Applied rewrites45.7%
Final simplification50.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.45e+172) (not (<= t 2.8e+126))) (fma 1.0 (- y x) x) (fma (/ y a) z x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.45e+172) || !(t <= 2.8e+126)) {
tmp = fma(1.0, (y - x), x);
} else {
tmp = fma((y / a), z, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.45e+172) || !(t <= 2.8e+126)) tmp = fma(1.0, Float64(y - x), x); else tmp = fma(Float64(y / a), z, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.45e+172], N[Not[LessEqual[t, 2.8e+126]], $MachinePrecision]], N[(1.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+172} \lor \neg \left(t \leq 2.8 \cdot 10^{+126}\right):\\
\;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\end{array}
\end{array}
if t < -1.45e172 or 2.80000000000000009e126 < t Initial program 36.8%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6465.5
Applied rewrites65.5%
Taylor expanded in t around inf
Applied rewrites47.1%
if -1.45e172 < t < 2.80000000000000009e126Initial program 80.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6457.0
Applied rewrites57.0%
Taylor expanded in x around 0
Applied rewrites48.6%
Final simplification48.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.5e-118) (not (<= t 2.1e+29))) (fma 1.0 (- y x) x) (/ (* y z) a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.5e-118) || !(t <= 2.1e+29)) {
tmp = fma(1.0, (y - x), x);
} else {
tmp = (y * z) / a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.5e-118) || !(t <= 2.1e+29)) tmp = fma(1.0, Float64(y - x), x); else tmp = Float64(Float64(y * z) / a); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.5e-118], N[Not[LessEqual[t, 2.1e+29]], $MachinePrecision]], N[(1.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-118} \lor \neg \left(t \leq 2.1 \cdot 10^{+29}\right):\\
\;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -1.50000000000000009e-118 or 2.1000000000000002e29 < t Initial program 54.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6477.1
Applied rewrites77.1%
Taylor expanded in t around inf
Applied rewrites30.0%
if -1.50000000000000009e-118 < t < 2.1000000000000002e29Initial program 89.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6471.6
Applied rewrites71.6%
Taylor expanded in x around 0
Applied rewrites26.4%
Final simplification28.6%
(FPCore (x y z t a) :precision binary64 (fma 1.0 (- y x) x))
double code(double x, double y, double z, double t, double a) {
return fma(1.0, (y - x), x);
}
function code(x, y, z, t, a) return fma(1.0, Float64(y - x), x) end
code[x_, y_, z_, t_, a_] := N[(1.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(1, y - x, x\right)
\end{array}
Initial program 68.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6484.1
Applied rewrites84.1%
Taylor expanded in t around inf
Applied rewrites20.6%
(FPCore (x y z t a) :precision binary64 (* 0.0 x))
double code(double x, double y, double z, double t, double a) {
return 0.0 * 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 = 0.0d0 * x
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0 * x;
}
def code(x, y, z, t, a): return 0.0 * x
function code(x, y, z, t, a) return Float64(0.0 * x) end
function tmp = code(x, y, z, t, a) tmp = 0.0 * x; end
code[x_, y_, z_, t_, a_] := N[(0.0 * x), $MachinePrecision]
\begin{array}{l}
\\
0 \cdot x
\end{array}
Initial program 68.3%
Taylor expanded in x around inf
+-commutativeN/A
distribute-rgt-inN/A
mul-1-negN/A
distribute-lft-neg-outN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6440.7
Applied rewrites40.7%
Taylor expanded in t around inf
Applied rewrites2.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (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) :: tmp
t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (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 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2025016
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))