
(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));
}
real(8) function code(x, y, z, t, a)
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));
}
real(8) function code(x, y, z, t, a)
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
(let* ((t_1 (fma (- y x) (/ z (- a t)) (fma (- x y) (/ t (- a t)) x)))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -1e-298)
t_1
(if (<= t_2 0.0) (+ y (/ (* (- y x) (- a z)) t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - x), (z / (a - t)), fma((x - y), (t / (a - t)), x));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -1e-298) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - x), Float64(z / Float64(a - t)), fma(Float64(x - y), Float64(t / Float64(a - t)), x)) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -1e-298) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-298], t$95$1, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - x, \frac{z}{a - t}, \mathsf{fma}\left(x - y, \frac{t}{a - t}, x\right)\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999912e-299 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 72.3%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites90.8%
if -9.99999999999999912e-299 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites46.3%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites99.8%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y x) (/ (- a t) (- z t)))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -1e-298)
t_1
(if (<= t_2 0.0) (+ y (/ (* (- y x) (- a z)) t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - x) / ((a - t) / (z - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -1e-298) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y - x) / ((a - t) / (z - t)))
t_2 = x + (((y - x) * (z - t)) / (a - t))
if (t_2 <= (-1d-298)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = y + (((y - x) * (a - z)) / t)
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) / ((a - t) / (z - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -1e-298) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - x) / ((a - t) / (z - t))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -1e-298: tmp = t_1 elif t_2 <= 0.0: tmp = y + (((y - x) * (a - z)) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -1e-298) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - x) / ((a - t) / (z - t))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -1e-298) tmp = t_1; elseif (t_2 <= 0.0) tmp = y + (((y - x) * (a - z)) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-298], t$95$1, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{\frac{a - t}{z - t}}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999912e-299 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 72.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6488.4
Applied rewrites88.4%
if -9.99999999999999912e-299 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites46.3%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites99.8%
Final simplification89.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- z t) (- a t)) (- y x) x))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -1e-298)
t_1
(if (<= t_2 0.0) (+ y (/ (* (- y x) (- a z)) t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((z - t) / (a - t)), (y - x), x);
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -1e-298) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -1e-298) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-298], t$95$1, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999912e-299 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 72.3%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6488.2
Applied rewrites88.2%
if -9.99999999999999912e-299 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites46.3%
Taylor expanded in t around inf
associate--l+N/A
associate-*r/N/A
associate-*r/N/A
mul-1-negN/A
div-subN/A
mul-1-negN/A
distribute-lft-out--N/A
associate-*r/N/A
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites99.8%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7.5e+115)
y
(if (<= t -9.5e-124)
(* z (/ (- x y) t))
(if (<= t 1.3e-70)
(* y (/ z a))
(if (<= t 2.2e+109) (* x (/ (- z a) t)) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.5e+115) {
tmp = y;
} else if (t <= -9.5e-124) {
tmp = z * ((x - y) / t);
} else if (t <= 1.3e-70) {
tmp = y * (z / a);
} else if (t <= 2.2e+109) {
tmp = x * ((z - a) / t);
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-7.5d+115)) then
tmp = y
else if (t <= (-9.5d-124)) then
tmp = z * ((x - y) / t)
else if (t <= 1.3d-70) then
tmp = y * (z / a)
else if (t <= 2.2d+109) then
tmp = x * ((z - a) / t)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.5e+115) {
tmp = y;
} else if (t <= -9.5e-124) {
tmp = z * ((x - y) / t);
} else if (t <= 1.3e-70) {
tmp = y * (z / a);
} else if (t <= 2.2e+109) {
tmp = x * ((z - a) / t);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.5e+115: tmp = y elif t <= -9.5e-124: tmp = z * ((x - y) / t) elif t <= 1.3e-70: tmp = y * (z / a) elif t <= 2.2e+109: tmp = x * ((z - a) / t) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.5e+115) tmp = y; elseif (t <= -9.5e-124) tmp = Float64(z * Float64(Float64(x - y) / t)); elseif (t <= 1.3e-70) tmp = Float64(y * Float64(z / a)); elseif (t <= 2.2e+109) tmp = Float64(x * Float64(Float64(z - a) / t)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7.5e+115) tmp = y; elseif (t <= -9.5e-124) tmp = z * ((x - y) / t); elseif (t <= 1.3e-70) tmp = y * (z / a); elseif (t <= 2.2e+109) tmp = x * ((z - a) / t); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.5e+115], y, If[LessEqual[t, -9.5e-124], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-70], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+109], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+115}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-124}:\\
\;\;\;\;z \cdot \frac{x - y}{t}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-70}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+109}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -7.4999999999999997e115 or 2.1999999999999999e109 < t Initial program 39.9%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites78.8%
Taylor expanded in t around inf
Applied rewrites58.7%
if -7.4999999999999997e115 < t < -9.49999999999999989e-124Initial program 78.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites59.5%
Taylor expanded in z around inf
Applied rewrites37.3%
if -9.49999999999999989e-124 < t < 1.30000000000000001e-70Initial program 88.2%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.1
Applied rewrites48.1%
Taylor expanded in a around inf
Applied rewrites46.7%
Taylor expanded in y around inf
Applied rewrites35.8%
if 1.30000000000000001e-70 < t < 2.1999999999999999e109Initial program 62.6%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites64.4%
Taylor expanded in x around inf
Applied rewrites35.5%
Applied rewrites39.5%
Final simplification43.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7.5e+115)
y
(if (<= t -9.5e-124)
(* z (/ (- x y) t))
(if (<= t 1.3e-70)
(* y (/ z a))
(if (<= t 2.2e+109) (* (- z a) (/ x t)) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.5e+115) {
tmp = y;
} else if (t <= -9.5e-124) {
tmp = z * ((x - y) / t);
} else if (t <= 1.3e-70) {
tmp = y * (z / a);
} else if (t <= 2.2e+109) {
tmp = (z - a) * (x / t);
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-7.5d+115)) then
tmp = y
else if (t <= (-9.5d-124)) then
tmp = z * ((x - y) / t)
else if (t <= 1.3d-70) then
tmp = y * (z / a)
else if (t <= 2.2d+109) then
tmp = (z - a) * (x / t)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.5e+115) {
tmp = y;
} else if (t <= -9.5e-124) {
tmp = z * ((x - y) / t);
} else if (t <= 1.3e-70) {
tmp = y * (z / a);
} else if (t <= 2.2e+109) {
tmp = (z - a) * (x / t);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.5e+115: tmp = y elif t <= -9.5e-124: tmp = z * ((x - y) / t) elif t <= 1.3e-70: tmp = y * (z / a) elif t <= 2.2e+109: tmp = (z - a) * (x / t) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.5e+115) tmp = y; elseif (t <= -9.5e-124) tmp = Float64(z * Float64(Float64(x - y) / t)); elseif (t <= 1.3e-70) tmp = Float64(y * Float64(z / a)); elseif (t <= 2.2e+109) tmp = Float64(Float64(z - a) * Float64(x / t)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7.5e+115) tmp = y; elseif (t <= -9.5e-124) tmp = z * ((x - y) / t); elseif (t <= 1.3e-70) tmp = y * (z / a); elseif (t <= 2.2e+109) tmp = (z - a) * (x / t); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.5e+115], y, If[LessEqual[t, -9.5e-124], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-70], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+109], N[(N[(z - a), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+115}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-124}:\\
\;\;\;\;z \cdot \frac{x - y}{t}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-70}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+109}:\\
\;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -7.4999999999999997e115 or 2.1999999999999999e109 < t Initial program 39.9%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites78.8%
Taylor expanded in t around inf
Applied rewrites58.7%
if -7.4999999999999997e115 < t < -9.49999999999999989e-124Initial program 78.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites59.5%
Taylor expanded in z around inf
Applied rewrites37.3%
if -9.49999999999999989e-124 < t < 1.30000000000000001e-70Initial program 88.2%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.1
Applied rewrites48.1%
Taylor expanded in a around inf
Applied rewrites46.7%
Taylor expanded in y around inf
Applied rewrites35.8%
if 1.30000000000000001e-70 < t < 2.1999999999999999e109Initial program 62.6%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites64.4%
Taylor expanded in x around inf
Applied rewrites35.5%
Applied rewrites39.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ (- x y) t))))
(if (<= t -7.5e+115)
y
(if (<= t -9.5e-124)
t_1
(if (<= t 2e-82) (* y (/ z a)) (if (<= t 2.2e+109) t_1 y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * ((x - y) / t);
double tmp;
if (t <= -7.5e+115) {
tmp = y;
} else if (t <= -9.5e-124) {
tmp = t_1;
} else if (t <= 2e-82) {
tmp = y * (z / a);
} else if (t <= 2.2e+109) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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 = z * ((x - y) / t)
if (t <= (-7.5d+115)) then
tmp = y
else if (t <= (-9.5d-124)) then
tmp = t_1
else if (t <= 2d-82) then
tmp = y * (z / a)
else if (t <= 2.2d+109) then
tmp = t_1
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z * ((x - y) / t);
double tmp;
if (t <= -7.5e+115) {
tmp = y;
} else if (t <= -9.5e-124) {
tmp = t_1;
} else if (t <= 2e-82) {
tmp = y * (z / a);
} else if (t <= 2.2e+109) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * ((x - y) / t) tmp = 0 if t <= -7.5e+115: tmp = y elif t <= -9.5e-124: tmp = t_1 elif t <= 2e-82: tmp = y * (z / a) elif t <= 2.2e+109: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(Float64(x - y) / t)) tmp = 0.0 if (t <= -7.5e+115) tmp = y; elseif (t <= -9.5e-124) tmp = t_1; elseif (t <= 2e-82) tmp = Float64(y * Float64(z / a)); elseif (t <= 2.2e+109) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * ((x - y) / t); tmp = 0.0; if (t <= -7.5e+115) tmp = y; elseif (t <= -9.5e-124) tmp = t_1; elseif (t <= 2e-82) tmp = y * (z / a); elseif (t <= 2.2e+109) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e+115], y, If[LessEqual[t, -9.5e-124], t$95$1, If[LessEqual[t, 2e-82], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+109], t$95$1, y]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{x - y}{t}\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+115}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-82}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -7.4999999999999997e115 or 2.1999999999999999e109 < t Initial program 39.9%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites78.8%
Taylor expanded in t around inf
Applied rewrites58.7%
if -7.4999999999999997e115 < t < -9.49999999999999989e-124 or 2e-82 < t < 2.1999999999999999e109Initial program 71.6%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites61.1%
Taylor expanded in z around inf
Applied rewrites37.1%
if -9.49999999999999989e-124 < t < 2e-82Initial program 88.1%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6448.6
Applied rewrites48.6%
Taylor expanded in a around inf
Applied rewrites47.2%
Taylor expanded in y around inf
Applied rewrites36.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7.5e+115)
y
(if (<= t -1.18e-40)
(* z (/ (- x y) t))
(if (<= t 1.42e+82) (- x (/ (* x z) a)) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.5e+115) {
tmp = y;
} else if (t <= -1.18e-40) {
tmp = z * ((x - y) / t);
} else if (t <= 1.42e+82) {
tmp = x - ((x * z) / a);
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-7.5d+115)) then
tmp = y
else if (t <= (-1.18d-40)) then
tmp = z * ((x - y) / t)
else if (t <= 1.42d+82) then
tmp = x - ((x * z) / a)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.5e+115) {
tmp = y;
} else if (t <= -1.18e-40) {
tmp = z * ((x - y) / t);
} else if (t <= 1.42e+82) {
tmp = x - ((x * z) / a);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.5e+115: tmp = y elif t <= -1.18e-40: tmp = z * ((x - y) / t) elif t <= 1.42e+82: tmp = x - ((x * z) / a) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.5e+115) tmp = y; elseif (t <= -1.18e-40) tmp = Float64(z * Float64(Float64(x - y) / t)); elseif (t <= 1.42e+82) tmp = Float64(x - Float64(Float64(x * z) / a)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7.5e+115) tmp = y; elseif (t <= -1.18e-40) tmp = z * ((x - y) / t); elseif (t <= 1.42e+82) tmp = x - ((x * z) / a); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.5e+115], y, If[LessEqual[t, -1.18e-40], N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.42e+82], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+115}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -1.18 \cdot 10^{-40}:\\
\;\;\;\;z \cdot \frac{x - y}{t}\\
\mathbf{elif}\;t \leq 1.42 \cdot 10^{+82}:\\
\;\;\;\;x - \frac{x \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -7.4999999999999997e115 or 1.41999999999999993e82 < t Initial program 40.3%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites77.5%
Taylor expanded in t around inf
Applied rewrites53.7%
if -7.4999999999999997e115 < t < -1.1799999999999999e-40Initial program 70.5%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites64.5%
Taylor expanded in z around inf
Applied rewrites36.0%
if -1.1799999999999999e-40 < t < 1.41999999999999993e82Initial program 85.0%
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-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6458.9
Applied rewrites58.9%
Taylor expanded in t around 0
Applied rewrites53.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
(if (<= t -1.18e-40)
t_1
(if (<= t 4e-34) (fma (- z t) (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -1.18e-40) {
tmp = t_1;
} else if (t <= 4e-34) {
tmp = fma((z - t), ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -1.18e-40) tmp = t_1; elseif (t <= 4e-34) tmp = fma(Float64(z - t), Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.18e-40], t$95$1, If[LessEqual[t, 4e-34], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -1.18 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-34}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1799999999999999e-40 or 3.99999999999999971e-34 < t Initial program 51.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites75.4%
if -1.1799999999999999e-40 < t < 3.99999999999999971e-34Initial program 88.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--.f6481.7
Applied rewrites81.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ (- z a) t) y))) (if (<= t -1.18e-40) t_1 (if (<= t 2.35e-21) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), ((z - a) / t), y);
double tmp;
if (t <= -1.18e-40) {
tmp = t_1;
} else if (t <= 2.35e-21) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y) tmp = 0.0 if (t <= -1.18e-40) tmp = t_1; elseif (t <= 2.35e-21) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.18e-40], t$95$1, If[LessEqual[t, 2.35e-21], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -1.18 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1799999999999999e-40 or 2.35000000000000015e-21 < t Initial program 51.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites75.4%
if -1.1799999999999999e-40 < t < 2.35000000000000015e-21Initial program 87.5%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6478.8
Applied rewrites78.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y x) (/ z (- a t)))))
(if (<= z -1.7e+84)
t_1
(if (<= z 1.25e-26) (fma (- x y) (/ t (- a t)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - x) * (z / (a - t));
double tmp;
if (z <= -1.7e+84) {
tmp = t_1;
} else if (z <= 1.25e-26) {
tmp = fma((x - y), (t / (a - t)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(y - x) * Float64(z / Float64(a - t))) tmp = 0.0 if (z <= -1.7e+84) tmp = t_1; elseif (z <= 1.25e-26) tmp = fma(Float64(x - y), Float64(t / Float64(a - t)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.7e+84], t$95$1, If[LessEqual[z, 1.25e-26], N[(N[(x - y), $MachinePrecision] * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-26}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.6999999999999999e84 or 1.25000000000000005e-26 < z Initial program 68.3%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6461.0
Applied rewrites61.0%
Applied rewrites77.5%
if -1.6999999999999999e84 < z < 1.25000000000000005e-26Initial program 67.9%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6468.3
Applied rewrites68.3%
Final simplification72.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.2e-37)
y
(if (<= t -3.5e-116)
(/ (* x z) t)
(if (<= t 28000000000.0) (* y (/ z a)) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.2e-37) {
tmp = y;
} else if (t <= -3.5e-116) {
tmp = (x * z) / t;
} else if (t <= 28000000000.0) {
tmp = y * (z / a);
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.2d-37)) then
tmp = y
else if (t <= (-3.5d-116)) then
tmp = (x * z) / t
else if (t <= 28000000000.0d0) then
tmp = y * (z / a)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.2e-37) {
tmp = y;
} else if (t <= -3.5e-116) {
tmp = (x * z) / t;
} else if (t <= 28000000000.0) {
tmp = y * (z / a);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.2e-37: tmp = y elif t <= -3.5e-116: tmp = (x * z) / t elif t <= 28000000000.0: tmp = y * (z / a) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.2e-37) tmp = y; elseif (t <= -3.5e-116) tmp = Float64(Float64(x * z) / t); elseif (t <= 28000000000.0) tmp = Float64(y * Float64(z / a)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.2e-37) tmp = y; elseif (t <= -3.5e-116) tmp = (x * z) / t; elseif (t <= 28000000000.0) tmp = y * (z / a); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.2e-37], y, If[LessEqual[t, -3.5e-116], N[(N[(x * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 28000000000.0], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-37}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-116}:\\
\;\;\;\;\frac{x \cdot z}{t}\\
\mathbf{elif}\;t \leq 28000000000:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.1999999999999999e-37 or 2.8e10 < t Initial program 50.6%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites80.4%
Taylor expanded in t around inf
Applied rewrites41.8%
if -3.1999999999999999e-37 < t < -3.49999999999999984e-116Initial program 90.5%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites53.7%
Taylor expanded in x around inf
Applied rewrites46.0%
Taylor expanded in z around inf
Applied rewrites41.0%
if -3.49999999999999984e-116 < t < 2.8e10Initial program 86.4%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6450.1
Applied rewrites50.1%
Taylor expanded in a around inf
Applied rewrites47.0%
Taylor expanded in y around inf
Applied rewrites35.0%
Final simplification39.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (- x y) (/ z t) y))) (if (<= t -1.18e-40) t_1 (if (<= t 1.42e+82) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((x - y), (z / t), y);
double tmp;
if (t <= -1.18e-40) {
tmp = t_1;
} else if (t <= 1.42e+82) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(x - y), Float64(z / t), y) tmp = 0.0 if (t <= -1.18e-40) tmp = t_1; elseif (t <= 1.42e+82) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.18e-40], t$95$1, If[LessEqual[t, 1.42e+82], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{if}\;t \leq -1.18 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.42 \cdot 10^{+82}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1799999999999999e-40 or 1.41999999999999993e82 < t Initial program 48.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites78.2%
Taylor expanded in z around inf
Applied rewrites68.2%
if -1.1799999999999999e-40 < t < 1.41999999999999993e82Initial program 85.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.6
Applied rewrites74.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma z (/ (- x y) t) y))) (if (<= t -1.18e-40) t_1 (if (<= t 1.42e+82) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((x - y) / t), y);
double tmp;
if (t <= -1.18e-40) {
tmp = t_1;
} else if (t <= 1.42e+82) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(x - y) / t), y) tmp = 0.0 if (t <= -1.18e-40) tmp = t_1; elseif (t <= 1.42e+82) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.18e-40], t$95$1, If[LessEqual[t, 1.42e+82], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{if}\;t \leq -1.18 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.42 \cdot 10^{+82}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.1799999999999999e-40 or 1.41999999999999993e82 < t Initial program 48.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites78.2%
Taylor expanded in a around 0
Applied rewrites66.7%
if -1.1799999999999999e-40 < t < 1.41999999999999993e82Initial program 85.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6474.6
Applied rewrites74.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma z (/ (- x y) t) y))) (if (<= t -2.05e-45) t_1 (if (<= t 2.8e-40) (- x (/ (* x z) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((x - y) / t), y);
double tmp;
if (t <= -2.05e-45) {
tmp = t_1;
} else if (t <= 2.8e-40) {
tmp = x - ((x * z) / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(x - y) / t), y) tmp = 0.0 if (t <= -2.05e-45) tmp = t_1; elseif (t <= 2.8e-40) tmp = Float64(x - Float64(Float64(x * z) / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.05e-45], t$95$1, If[LessEqual[t, 2.8e-40], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{x - y}{t}, y\right)\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{-45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-40}:\\
\;\;\;\;x - \frac{x \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.05e-45 or 2.8e-40 < t Initial program 52.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites75.1%
Taylor expanded in a around 0
Applied rewrites64.2%
if -2.05e-45 < t < 2.8e-40Initial program 88.5%
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-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6463.0
Applied rewrites63.0%
Taylor expanded in t around 0
Applied rewrites56.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma a (/ (- y x) t) y))) (if (<= t -0.0075) t_1 (if (<= t 5.2e+81) (- x (/ (* x z) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, ((y - x) / t), y);
double tmp;
if (t <= -0.0075) {
tmp = t_1;
} else if (t <= 5.2e+81) {
tmp = x - ((x * z) / a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(Float64(y - x) / t), y) tmp = 0.0 if (t <= -0.0075) tmp = t_1; elseif (t <= 5.2e+81) tmp = Float64(x - Float64(Float64(x * z) / a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -0.0075], t$95$1, If[LessEqual[t, 5.2e+81], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\mathbf{if}\;t \leq -0.0075:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+81}:\\
\;\;\;\;x - \frac{x \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -0.0074999999999999997 or 5.19999999999999984e81 < t Initial program 45.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
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites79.1%
Taylor expanded in z around 0
Applied rewrites57.8%
if -0.0074999999999999997 < t < 5.19999999999999984e81Initial program 84.9%
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-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6456.7
Applied rewrites56.7%
Taylor expanded in t around 0
Applied rewrites51.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -3.05e+94) (* x (/ (- z a) t)) (if (<= x 1.05e+111) y (* x (/ z (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.05e+94) {
tmp = x * ((z - a) / t);
} else if (x <= 1.05e+111) {
tmp = y;
} else {
tmp = x * (z / (t - a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-3.05d+94)) then
tmp = x * ((z - a) / t)
else if (x <= 1.05d+111) then
tmp = y
else
tmp = x * (z / (t - a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.05e+94) {
tmp = x * ((z - a) / t);
} else if (x <= 1.05e+111) {
tmp = y;
} else {
tmp = x * (z / (t - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -3.05e+94: tmp = x * ((z - a) / t) elif x <= 1.05e+111: tmp = y else: tmp = x * (z / (t - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.05e+94) tmp = Float64(x * Float64(Float64(z - a) / t)); elseif (x <= 1.05e+111) tmp = y; else tmp = Float64(x * Float64(z / Float64(t - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -3.05e+94) tmp = x * ((z - a) / t); elseif (x <= 1.05e+111) tmp = y; else tmp = x * (z / (t - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.05e+94], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+111], y, N[(x * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.05 \cdot 10^{+94}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+111}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{t - a}\\
\end{array}
\end{array}
if x < -3.05000000000000017e94Initial program 48.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites64.9%
Taylor expanded in x around inf
Applied rewrites37.0%
Applied rewrites53.0%
if -3.05000000000000017e94 < x < 1.04999999999999997e111Initial program 76.5%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites91.9%
Taylor expanded in t around inf
Applied rewrites34.8%
if 1.04999999999999997e111 < x Initial program 59.8%
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-rgt-neg-inN/A
*-lft-identityN/A
lower-fma.f64N/A
lower--.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
remove-double-negN/A
lower-+.f64N/A
lower-neg.f6471.9
Applied rewrites71.9%
Taylor expanded in z around inf
Applied rewrites48.5%
Final simplification40.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* x z) t))) (if (<= x -8.2e+95) t_1 (if (<= x 1.52e+121) y t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * z) / t;
double tmp;
if (x <= -8.2e+95) {
tmp = t_1;
} else if (x <= 1.52e+121) {
tmp = y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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 * z) / t
if (x <= (-8.2d+95)) then
tmp = t_1
else if (x <= 1.52d+121) then
tmp = y
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 * z) / t;
double tmp;
if (x <= -8.2e+95) {
tmp = t_1;
} else if (x <= 1.52e+121) {
tmp = y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x * z) / t tmp = 0 if x <= -8.2e+95: tmp = t_1 elif x <= 1.52e+121: tmp = y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x * z) / t) tmp = 0.0 if (x <= -8.2e+95) tmp = t_1; elseif (x <= 1.52e+121) tmp = y; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x * z) / t; tmp = 0.0; if (x <= -8.2e+95) tmp = t_1; elseif (x <= 1.52e+121) tmp = y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * z), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[x, -8.2e+95], t$95$1, If[LessEqual[x, 1.52e+121], y, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot z}{t}\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.52 \cdot 10^{+121}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -8.19999999999999972e95 or 1.5199999999999999e121 < x Initial program 53.6%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-out--N/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites58.2%
Taylor expanded in x around inf
Applied rewrites37.7%
Taylor expanded in z around inf
Applied rewrites26.1%
if -8.19999999999999972e95 < x < 1.5199999999999999e121Initial program 76.2%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites92.0%
Taylor expanded in t around inf
Applied rewrites34.4%
Final simplification31.4%
(FPCore (x y z t a) :precision binary64 y)
double code(double x, double y, double z, double t, double a) {
return y;
}
real(8) function code(x, y, z, t, a)
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 = y
end function
public static double code(double x, double y, double z, double t, double a) {
return y;
}
def code(x, y, z, t, a): return y
function code(x, y, z, t, a) return y end
function tmp = code(x, y, z, t, a) tmp = y; end
code[x_, y_, z_, t_, a_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 68.1%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
+-commutativeN/A
Applied rewrites88.0%
Taylor expanded in t around inf
Applied rewrites25.0%
(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;
}
real(8) function code(x, y, z, t, a)
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 2024233
(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))))