
(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 17 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 (+ (/ (- y x) (/ (- a t) (- z t))) x))
(t_2 (+ (/ (* (- z t) (- y x)) (- a t)) x)))
(if (<= t_2 -1e-214) t_1 (if (<= t_2 0.0) (fma (/ x t) (- z a) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) / ((a - t) / (z - t))) + x;
double t_2 = (((z - t) * (y - x)) / (a - t)) + x;
double tmp;
if (t_2 <= -1e-214) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = fma((x / t), (z - a), y);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t))) + x) t_2 = Float64(Float64(Float64(Float64(z - t) * Float64(y - x)) / Float64(a - t)) + x) tmp = 0.0 if (t_2 <= -1e-214) tmp = t_1; elseif (t_2 <= 0.0) tmp = fma(Float64(x / t), Float64(z - a), y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z - t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-214], t$95$1, If[LessEqual[t$95$2, 0.0], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - x}{\frac{a - t}{z - t}} + x\\
t_2 := \frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t} + x\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999913e-215 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 76.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6490.9
Applied rewrites90.9%
if -9.99999999999999913e-215 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 9.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 rewrites99.8%
Taylor expanded in y around 0
Applied rewrites99.8%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y))
(t_2 (+ (/ (* (- z t) (- y x)) (- a t)) x)))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -1e-214)
t_2
(if (<= t_2 0.0)
(fma (/ x t) (- z a) y)
(if (<= t_2 4e+302) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double t_2 = (((z - t) * (y - x)) / (a - t)) + x;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -1e-214) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = fma((x / t), (z - a), y);
} else if (t_2 <= 4e+302) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) t_2 = Float64(Float64(Float64(Float64(z - t) * Float64(y - x)) / Float64(a - t)) + x) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -1e-214) tmp = t_2; elseif (t_2 <= 0.0) tmp = fma(Float64(x / t), Float64(z - a), y); elseif (t_2 <= 4e+302) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(z - t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-214], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t$95$2, 4e+302], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
t_2 := \frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t} + x\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-214}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+302}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 4.0000000000000003e302 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 41.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
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 rewrites75.7%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -9.99999999999999913e-215 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 4.0000000000000003e302Initial program 98.2%
if -9.99999999999999913e-215 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 9.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 rewrites99.8%
Taylor expanded in y around 0
Applied rewrites99.8%
Final simplification90.2%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.1e+77)
(/ y 1.0)
(if (<= t -2.3e-45)
(* (/ (- z a) t) x)
(if (<= t 3.8e-74)
(/ (* z (- y x)) a)
(if (<= t 1.02e+111) (/ (* (- x y) z) t) (/ y 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.1e+77) {
tmp = y / 1.0;
} else if (t <= -2.3e-45) {
tmp = ((z - a) / t) * x;
} else if (t <= 3.8e-74) {
tmp = (z * (y - x)) / a;
} else if (t <= 1.02e+111) {
tmp = ((x - y) * z) / t;
} else {
tmp = y / 1.0;
}
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 <= (-1.1d+77)) then
tmp = y / 1.0d0
else if (t <= (-2.3d-45)) then
tmp = ((z - a) / t) * x
else if (t <= 3.8d-74) then
tmp = (z * (y - x)) / a
else if (t <= 1.02d+111) then
tmp = ((x - y) * z) / t
else
tmp = y / 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.1e+77) {
tmp = y / 1.0;
} else if (t <= -2.3e-45) {
tmp = ((z - a) / t) * x;
} else if (t <= 3.8e-74) {
tmp = (z * (y - x)) / a;
} else if (t <= 1.02e+111) {
tmp = ((x - y) * z) / t;
} else {
tmp = y / 1.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.1e+77: tmp = y / 1.0 elif t <= -2.3e-45: tmp = ((z - a) / t) * x elif t <= 3.8e-74: tmp = (z * (y - x)) / a elif t <= 1.02e+111: tmp = ((x - y) * z) / t else: tmp = y / 1.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.1e+77) tmp = Float64(y / 1.0); elseif (t <= -2.3e-45) tmp = Float64(Float64(Float64(z - a) / t) * x); elseif (t <= 3.8e-74) tmp = Float64(Float64(z * Float64(y - x)) / a); elseif (t <= 1.02e+111) tmp = Float64(Float64(Float64(x - y) * z) / t); else tmp = Float64(y / 1.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.1e+77) tmp = y / 1.0; elseif (t <= -2.3e-45) tmp = ((z - a) / t) * x; elseif (t <= 3.8e-74) tmp = (z * (y - x)) / a; elseif (t <= 1.02e+111) tmp = ((x - y) * z) / t; else tmp = y / 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.1e+77], N[(y / 1.0), $MachinePrecision], If[LessEqual[t, -2.3e-45], N[(N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t, 3.8e-74], N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1.02e+111], N[(N[(N[(x - y), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision], N[(y / 1.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+77}:\\
\;\;\;\;\frac{y}{1}\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-45}:\\
\;\;\;\;\frac{z - a}{t} \cdot x\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-74}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{a}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+111}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{1}\\
\end{array}
\end{array}
if t < -1.1e77 or 1.02e111 < t Initial program 45.9%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6450.7
Applied rewrites50.7%
Applied rewrites65.0%
Taylor expanded in t around inf
Applied rewrites52.6%
if -1.1e77 < t < -2.29999999999999992e-45Initial program 76.1%
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 rewrites59.2%
Taylor expanded in y around 0
Applied rewrites32.8%
Applied rewrites40.3%
if -2.29999999999999992e-45 < t < 3.7999999999999996e-74Initial program 91.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6497.1
Applied rewrites97.1%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6486.2
Applied rewrites86.2%
Taylor expanded in z around inf
Applied rewrites52.3%
if 3.7999999999999996e-74 < t < 1.02e111Initial program 73.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
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 rewrites65.1%
Taylor expanded in z around inf
Applied rewrites45.7%
Final simplification50.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.3e-10)
(fma (/ (- x y) t) z y)
(if (<= t 1.3e-73)
(fma (- y x) (/ z a) x)
(if (<= t 4e+79) (* (/ y (- a t)) (- z t)) (fma (/ x t) (- z a) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.3e-10) {
tmp = fma(((x - y) / t), z, y);
} else if (t <= 1.3e-73) {
tmp = fma((y - x), (z / a), x);
} else if (t <= 4e+79) {
tmp = (y / (a - t)) * (z - t);
} else {
tmp = fma((x / t), (z - a), y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.3e-10) tmp = fma(Float64(Float64(x - y) / t), z, y); elseif (t <= 1.3e-73) tmp = fma(Float64(y - x), Float64(z / a), x); elseif (t <= 4e+79) tmp = Float64(Float64(y / Float64(a - t)) * Float64(z - t)); else tmp = fma(Float64(x / t), Float64(z - a), y); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.3e-10], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision], If[LessEqual[t, 1.3e-73], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 4e+79], N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{-10}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-73}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+79}:\\
\;\;\;\;\frac{y}{a - t} \cdot \left(z - t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{t}, z - a, y\right)\\
\end{array}
\end{array}
if t < -4.30000000000000014e-10Initial program 51.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 rewrites81.9%
Taylor expanded in a around 0
Applied rewrites74.4%
if -4.30000000000000014e-10 < t < 1.3e-73Initial program 92.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6497.4
Applied rewrites97.4%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.4
Applied rewrites83.4%
Taylor expanded in t around 0
Applied rewrites81.1%
if 1.3e-73 < t < 3.99999999999999987e79Initial program 77.3%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6463.7
Applied rewrites63.7%
if 3.99999999999999987e79 < t Initial program 41.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
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 rewrites80.0%
Taylor expanded in y around 0
Applied rewrites78.1%
Final simplification77.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.45e+77)
(/ y 1.0)
(if (<= t 1.7e-74)
(* (/ z (- a t)) y)
(if (<= t 1.02e+111) (/ (* (- x y) z) t) (/ y 1.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.45e+77) {
tmp = y / 1.0;
} else if (t <= 1.7e-74) {
tmp = (z / (a - t)) * y;
} else if (t <= 1.02e+111) {
tmp = ((x - y) * z) / t;
} else {
tmp = y / 1.0;
}
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 <= (-2.45d+77)) then
tmp = y / 1.0d0
else if (t <= 1.7d-74) then
tmp = (z / (a - t)) * y
else if (t <= 1.02d+111) then
tmp = ((x - y) * z) / t
else
tmp = y / 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.45e+77) {
tmp = y / 1.0;
} else if (t <= 1.7e-74) {
tmp = (z / (a - t)) * y;
} else if (t <= 1.02e+111) {
tmp = ((x - y) * z) / t;
} else {
tmp = y / 1.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.45e+77: tmp = y / 1.0 elif t <= 1.7e-74: tmp = (z / (a - t)) * y elif t <= 1.02e+111: tmp = ((x - y) * z) / t else: tmp = y / 1.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.45e+77) tmp = Float64(y / 1.0); elseif (t <= 1.7e-74) tmp = Float64(Float64(z / Float64(a - t)) * y); elseif (t <= 1.02e+111) tmp = Float64(Float64(Float64(x - y) * z) / t); else tmp = Float64(y / 1.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.45e+77) tmp = y / 1.0; elseif (t <= 1.7e-74) tmp = (z / (a - t)) * y; elseif (t <= 1.02e+111) tmp = ((x - y) * z) / t; else tmp = y / 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.45e+77], N[(y / 1.0), $MachinePrecision], If[LessEqual[t, 1.7e-74], N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t, 1.02e+111], N[(N[(N[(x - y), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision], N[(y / 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.45 \cdot 10^{+77}:\\
\;\;\;\;\frac{y}{1}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-74}:\\
\;\;\;\;\frac{z}{a - t} \cdot y\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+111}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{1}\\
\end{array}
\end{array}
if t < -2.4500000000000002e77 or 1.02e111 < t Initial program 45.3%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6450.2
Applied rewrites50.2%
Applied rewrites64.7%
Taylor expanded in t around inf
Applied rewrites53.1%
if -2.4500000000000002e77 < t < 1.7e-74Initial program 88.8%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6444.3
Applied rewrites44.3%
Taylor expanded in z around inf
Applied rewrites39.8%
if 1.7e-74 < t < 1.02e111Initial program 73.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
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 rewrites65.1%
Taylor expanded in z around inf
Applied rewrites45.7%
Final simplification45.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y)))
(if (<= t -1.2e+27)
t_1
(if (<= t 1.9e-39) (+ (/ (* z (- y x)) (- a t)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -1.2e+27) {
tmp = t_1;
} else if (t <= 1.9e-39) {
tmp = ((z * (y - x)) / (a - t)) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -1.2e+27) tmp = t_1; elseif (t <= 1.9e-39) tmp = Float64(Float64(Float64(z * Float64(y - x)) / Float64(a - t)) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -1.2e+27], t$95$1, If[LessEqual[t, 1.9e-39], N[(N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-39}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.19999999999999999e27 or 1.9000000000000001e-39 < t Initial program 49.9%
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 rewrites79.2%
if -1.19999999999999999e27 < t < 1.9000000000000001e-39Initial program 92.9%
Taylor expanded in t around 0
lower-*.f64N/A
lower--.f6485.8
Applied rewrites85.8%
Final simplification82.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y)))
(if (<= t -310000.0)
t_1
(if (<= t 3.65e-13) (fma (- y x) (/ (- z t) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -310000.0) {
tmp = t_1;
} else if (t <= 3.65e-13) {
tmp = fma((y - x), ((z - t) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -310000.0) tmp = t_1; elseif (t <= 3.65e-13) tmp = fma(Float64(y - x), Float64(Float64(z - t) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -310000.0], t$95$1, If[LessEqual[t, 3.65e-13], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -310000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.65 \cdot 10^{-13}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.1e5 or 3.6500000000000001e-13 < t Initial program 50.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
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 rewrites79.1%
if -3.1e5 < t < 3.6500000000000001e-13Initial program 92.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6496.4
Applied rewrites96.4%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6481.5
Applied rewrites81.5%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) (- z a) y))) (if (<= t -4.3e-10) t_1 (if (<= t 1e-73) (fma (- y x) (/ z a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -4.3e-10) {
tmp = t_1;
} else if (t <= 1e-73) {
tmp = fma((y - x), (z / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -4.3e-10) tmp = t_1; elseif (t <= 1e-73) tmp = fma(Float64(y - x), Float64(z / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -4.3e-10], t$95$1, If[LessEqual[t, 1e-73], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 10^{-73}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.30000000000000014e-10 or 9.99999999999999997e-74 < t Initial program 53.1%
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 rewrites77.7%
if -4.30000000000000014e-10 < t < 9.99999999999999997e-74Initial program 92.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6497.4
Applied rewrites97.4%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.4
Applied rewrites83.4%
Taylor expanded in t around 0
Applied rewrites81.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) z y))) (if (<= t -4.3e-10) t_1 (if (<= t 1e-73) (fma (- y x) (/ z a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), z, y);
double tmp;
if (t <= -4.3e-10) {
tmp = t_1;
} else if (t <= 1e-73) {
tmp = fma((y - x), (z / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), z, y) tmp = 0.0 if (t <= -4.3e-10) tmp = t_1; elseif (t <= 1e-73) tmp = fma(Float64(y - x), Float64(z / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[t, -4.3e-10], t$95$1, If[LessEqual[t, 1e-73], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 10^{-73}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.30000000000000014e-10 or 9.99999999999999997e-74 < t Initial program 53.1%
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 rewrites77.7%
Taylor expanded in a around 0
Applied rewrites70.3%
if -4.30000000000000014e-10 < t < 9.99999999999999997e-74Initial program 92.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6497.4
Applied rewrites97.4%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6483.4
Applied rewrites83.4%
Taylor expanded in t around 0
Applied rewrites81.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) z y))) (if (<= t -4.3e-10) t_1 (if (<= t 1e-73) (fma (/ (- y x) a) z x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), z, y);
double tmp;
if (t <= -4.3e-10) {
tmp = t_1;
} else if (t <= 1e-73) {
tmp = fma(((y - x) / a), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), z, y) tmp = 0.0 if (t <= -4.3e-10) tmp = t_1; elseif (t <= 1e-73) tmp = fma(Float64(Float64(y - x) / a), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[t, -4.3e-10], t$95$1, If[LessEqual[t, 1e-73], N[(N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 10^{-73}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - x}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.30000000000000014e-10 or 9.99999999999999997e-74 < t Initial program 53.1%
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 rewrites77.7%
Taylor expanded in a around 0
Applied rewrites70.3%
if -4.30000000000000014e-10 < t < 9.99999999999999997e-74Initial program 92.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6476.8
Applied rewrites76.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) z y))) (if (<= t -7.6e-113) t_1 (if (<= t 3.8e-74) (/ (* z (- y x)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), z, y);
double tmp;
if (t <= -7.6e-113) {
tmp = t_1;
} else if (t <= 3.8e-74) {
tmp = (z * (y - x)) / a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), z, y) tmp = 0.0 if (t <= -7.6e-113) tmp = t_1; elseif (t <= 3.8e-74) tmp = Float64(Float64(z * Float64(y - x)) / a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[t, -7.6e-113], t$95$1, If[LessEqual[t, 3.8e-74], N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-74}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.59999999999999966e-113 or 3.7999999999999996e-74 < t Initial program 59.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
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 rewrites73.2%
Taylor expanded in a around 0
Applied rewrites67.0%
if -7.59999999999999966e-113 < t < 3.7999999999999996e-74Initial program 91.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6497.8
Applied rewrites97.8%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6489.8
Applied rewrites89.8%
Taylor expanded in z around inf
Applied rewrites54.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.45e+77) (/ y 1.0) (if (<= t 1.1e+80) (* (/ z (- a t)) y) (/ y 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.45e+77) {
tmp = y / 1.0;
} else if (t <= 1.1e+80) {
tmp = (z / (a - t)) * y;
} else {
tmp = y / 1.0;
}
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 <= (-2.45d+77)) then
tmp = y / 1.0d0
else if (t <= 1.1d+80) then
tmp = (z / (a - t)) * y
else
tmp = y / 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.45e+77) {
tmp = y / 1.0;
} else if (t <= 1.1e+80) {
tmp = (z / (a - t)) * y;
} else {
tmp = y / 1.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.45e+77: tmp = y / 1.0 elif t <= 1.1e+80: tmp = (z / (a - t)) * y else: tmp = y / 1.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.45e+77) tmp = Float64(y / 1.0); elseif (t <= 1.1e+80) tmp = Float64(Float64(z / Float64(a - t)) * y); else tmp = Float64(y / 1.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.45e+77) tmp = y / 1.0; elseif (t <= 1.1e+80) tmp = (z / (a - t)) * y; else tmp = y / 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.45e+77], N[(y / 1.0), $MachinePrecision], If[LessEqual[t, 1.1e+80], N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(y / 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.45 \cdot 10^{+77}:\\
\;\;\;\;\frac{y}{1}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+80}:\\
\;\;\;\;\frac{z}{a - t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{1}\\
\end{array}
\end{array}
if t < -2.4500000000000002e77 or 1.10000000000000001e80 < t Initial program 46.7%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6448.3
Applied rewrites48.3%
Applied rewrites61.9%
Taylor expanded in t around inf
Applied rewrites51.0%
if -2.4500000000000002e77 < t < 1.10000000000000001e80Initial program 86.2%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.4
Applied rewrites47.4%
Taylor expanded in z around inf
Applied rewrites38.8%
Final simplification43.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.4e-18) (/ y 1.0) (if (<= t 3.15e+65) (* (/ z a) y) (/ y 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.4e-18) {
tmp = y / 1.0;
} else if (t <= 3.15e+65) {
tmp = (z / a) * y;
} else {
tmp = y / 1.0;
}
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 <= (-5.4d-18)) then
tmp = y / 1.0d0
else if (t <= 3.15d+65) then
tmp = (z / a) * y
else
tmp = y / 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.4e-18) {
tmp = y / 1.0;
} else if (t <= 3.15e+65) {
tmp = (z / a) * y;
} else {
tmp = y / 1.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.4e-18: tmp = y / 1.0 elif t <= 3.15e+65: tmp = (z / a) * y else: tmp = y / 1.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.4e-18) tmp = Float64(y / 1.0); elseif (t <= 3.15e+65) tmp = Float64(Float64(z / a) * y); else tmp = Float64(y / 1.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.4e-18) tmp = y / 1.0; elseif (t <= 3.15e+65) tmp = (z / a) * y; else tmp = y / 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.4e-18], N[(y / 1.0), $MachinePrecision], If[LessEqual[t, 3.15e+65], N[(N[(z / a), $MachinePrecision] * y), $MachinePrecision], N[(y / 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{-18}:\\
\;\;\;\;\frac{y}{1}\\
\mathbf{elif}\;t \leq 3.15 \cdot 10^{+65}:\\
\;\;\;\;\frac{z}{a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{1}\\
\end{array}
\end{array}
if t < -5.39999999999999977e-18 or 3.14999999999999999e65 < t Initial program 49.2%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.2
Applied rewrites47.2%
Applied rewrites58.9%
Taylor expanded in t around inf
Applied rewrites45.8%
if -5.39999999999999977e-18 < t < 3.14999999999999999e65Initial program 89.8%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6448.2
Applied rewrites48.2%
Taylor expanded in t around 0
Applied rewrites31.8%
Applied rewrites35.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.4e-18) (/ y 1.0) (if (<= t 3.15e+65) (* (/ y a) z) (/ y 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.4e-18) {
tmp = y / 1.0;
} else if (t <= 3.15e+65) {
tmp = (y / a) * z;
} else {
tmp = y / 1.0;
}
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 <= (-5.4d-18)) then
tmp = y / 1.0d0
else if (t <= 3.15d+65) then
tmp = (y / a) * z
else
tmp = y / 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.4e-18) {
tmp = y / 1.0;
} else if (t <= 3.15e+65) {
tmp = (y / a) * z;
} else {
tmp = y / 1.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.4e-18: tmp = y / 1.0 elif t <= 3.15e+65: tmp = (y / a) * z else: tmp = y / 1.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.4e-18) tmp = Float64(y / 1.0); elseif (t <= 3.15e+65) tmp = Float64(Float64(y / a) * z); else tmp = Float64(y / 1.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.4e-18) tmp = y / 1.0; elseif (t <= 3.15e+65) tmp = (y / a) * z; else tmp = y / 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.4e-18], N[(y / 1.0), $MachinePrecision], If[LessEqual[t, 3.15e+65], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision], N[(y / 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{-18}:\\
\;\;\;\;\frac{y}{1}\\
\mathbf{elif}\;t \leq 3.15 \cdot 10^{+65}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{1}\\
\end{array}
\end{array}
if t < -5.39999999999999977e-18 or 3.14999999999999999e65 < t Initial program 49.2%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.2
Applied rewrites47.2%
Applied rewrites58.9%
Taylor expanded in t around inf
Applied rewrites45.8%
if -5.39999999999999977e-18 < t < 3.14999999999999999e65Initial program 89.8%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6448.2
Applied rewrites48.2%
Taylor expanded in t around 0
Applied rewrites31.8%
Applied rewrites34.2%
(FPCore (x y z t a) :precision binary64 (/ y 1.0))
double code(double x, double y, double z, double t, double a) {
return y / 1.0;
}
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 / 1.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return y / 1.0;
}
def code(x, y, z, t, a): return y / 1.0
function code(x, y, z, t, a) return Float64(y / 1.0) end
function tmp = code(x, y, z, t, a) tmp = y / 1.0; end
code[x_, y_, z_, t_, a_] := N[(y / 1.0), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{1}
\end{array}
Initial program 70.9%
Taylor expanded in y around inf
div-subN/A
associate-/l*N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6447.8
Applied rewrites47.8%
Applied rewrites54.6%
Taylor expanded in t around inf
Applied rewrites26.0%
(FPCore (x y z t a) :precision binary64 (+ (- y x) x))
double code(double x, double y, double z, double t, double a) {
return (y - x) + x;
}
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 - x) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (y - x) + x;
}
def code(x, y, z, t, a): return (y - x) + x
function code(x, y, z, t, a) return Float64(Float64(y - x) + x) end
function tmp = code(x, y, z, t, a) tmp = (y - x) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(y - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(y - x\right) + x
\end{array}
Initial program 70.9%
Taylor expanded in t around inf
lower--.f6420.0
Applied rewrites20.0%
Final simplification20.0%
(FPCore (x y z t a) :precision binary64 (+ (- x) x))
double code(double x, double y, double z, double t, double a) {
return -x + x;
}
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 + x
end function
public static double code(double x, double y, double z, double t, double a) {
return -x + x;
}
def code(x, y, z, t, a): return -x + x
function code(x, y, z, t, a) return Float64(Float64(-x) + x) end
function tmp = code(x, y, z, t, a) tmp = -x + x; end
code[x_, y_, z_, t_, a_] := N[((-x) + x), $MachinePrecision]
\begin{array}{l}
\\
\left(-x\right) + x
\end{array}
Initial program 70.9%
Taylor expanded in t around inf
lower--.f6420.0
Applied rewrites20.0%
Taylor expanded in y around 0
Applied rewrites2.9%
Final simplification2.9%
(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 2024268
(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))))