
(FPCore (a rand) :precision binary64 (let* ((t_0 (- a (/ 1.0 3.0)))) (* t_0 (+ 1.0 (* (/ 1.0 (sqrt (* 9.0 t_0))) rand)))))
double code(double a, double rand) {
double t_0 = a - (1.0 / 3.0);
return t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand));
}
real(8) function code(a, rand)
use fmin_fmax_functions
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
t_0 = a - (1.0d0 / 3.0d0)
code = t_0 * (1.0d0 + ((1.0d0 / sqrt((9.0d0 * t_0))) * rand))
end function
public static double code(double a, double rand) {
double t_0 = a - (1.0 / 3.0);
return t_0 * (1.0 + ((1.0 / Math.sqrt((9.0 * t_0))) * rand));
}
def code(a, rand): t_0 = a - (1.0 / 3.0) return t_0 * (1.0 + ((1.0 / math.sqrt((9.0 * t_0))) * rand))
function code(a, rand) t_0 = Float64(a - Float64(1.0 / 3.0)) return Float64(t_0 * Float64(1.0 + Float64(Float64(1.0 / sqrt(Float64(9.0 * t_0))) * rand))) end
function tmp = code(a, rand) t_0 = a - (1.0 / 3.0); tmp = t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand)); end
code[a_, rand_] := Block[{t$95$0 = N[(a - N[(1.0 / 3.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$0 * N[(1.0 + N[(N[(1.0 / N[Sqrt[N[(9.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_0 := a - \frac{1}{3}\\
t\_0 \cdot \left(1 + \frac{1}{\sqrt{9 \cdot t\_0}} \cdot rand\right)
\end{array}
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (a rand) :precision binary64 (let* ((t_0 (- a (/ 1.0 3.0)))) (* t_0 (+ 1.0 (* (/ 1.0 (sqrt (* 9.0 t_0))) rand)))))
double code(double a, double rand) {
double t_0 = a - (1.0 / 3.0);
return t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand));
}
real(8) function code(a, rand)
use fmin_fmax_functions
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
t_0 = a - (1.0d0 / 3.0d0)
code = t_0 * (1.0d0 + ((1.0d0 / sqrt((9.0d0 * t_0))) * rand))
end function
public static double code(double a, double rand) {
double t_0 = a - (1.0 / 3.0);
return t_0 * (1.0 + ((1.0 / Math.sqrt((9.0 * t_0))) * rand));
}
def code(a, rand): t_0 = a - (1.0 / 3.0) return t_0 * (1.0 + ((1.0 / math.sqrt((9.0 * t_0))) * rand))
function code(a, rand) t_0 = Float64(a - Float64(1.0 / 3.0)) return Float64(t_0 * Float64(1.0 + Float64(Float64(1.0 / sqrt(Float64(9.0 * t_0))) * rand))) end
function tmp = code(a, rand) t_0 = a - (1.0 / 3.0); tmp = t_0 * (1.0 + ((1.0 / sqrt((9.0 * t_0))) * rand)); end
code[a_, rand_] := Block[{t$95$0 = N[(a - N[(1.0 / 3.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$0 * N[(1.0 + N[(N[(1.0 / N[Sqrt[N[(9.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
t_0 := a - \frac{1}{3}\\
t\_0 \cdot \left(1 + \frac{1}{\sqrt{9 \cdot t\_0}} \cdot rand\right)
\end{array}
(FPCore (a rand)
:precision binary64
(let* ((t_0 (sqrt (/ 9.0 a))) (t_1 (* rand (- a 0.3333333333333333))))
(if (<= a -4.1e+157)
(/ t_1 (sqrt (sqrt (* (fma 9.0 a -3.0) (fma 9.0 a -3.0)))))
(if (<= a -0.33)
(*
(/
(fma a a -0.1111111111111111)
(/
(fma (* a a) a 0.037037037037037035)
(fma a a (fma -0.3333333333333333 a 0.1111111111111111))))
1.0)
(if (<= a 1.55e-162)
(* (/ (pow a 2.0) (- a -0.3333333333333333)) 1.0)
(if (<= a 3.2e+26)
(/
t_1
(*
a
(-
(+
t_0
(*
-1.0
(/
(fma
1.6875
(/ 1.0 (* (pow a 2.0) (pow t_0 5.0)))
(* 1.125 (/ 1.0 (pow t_0 3.0))))
(pow a 4.0))))
(/ 1.5 (* (pow a 2.0) t_0)))))
(fma
(/ (- a 0.3333333333333333) (sqrt (fma 9.0 a -3.0)))
rand
(- a 0.3333333333333333))))))))double code(double a, double rand) {
double t_0 = sqrt((9.0 / a));
double t_1 = rand * (a - 0.3333333333333333);
double tmp;
if (a <= -4.1e+157) {
tmp = t_1 / sqrt(sqrt((fma(9.0, a, -3.0) * fma(9.0, a, -3.0))));
} else if (a <= -0.33) {
tmp = (fma(a, a, -0.1111111111111111) / (fma((a * a), a, 0.037037037037037035) / fma(a, a, fma(-0.3333333333333333, a, 0.1111111111111111)))) * 1.0;
} else if (a <= 1.55e-162) {
tmp = (pow(a, 2.0) / (a - -0.3333333333333333)) * 1.0;
} else if (a <= 3.2e+26) {
tmp = t_1 / (a * ((t_0 + (-1.0 * (fma(1.6875, (1.0 / (pow(a, 2.0) * pow(t_0, 5.0))), (1.125 * (1.0 / pow(t_0, 3.0)))) / pow(a, 4.0)))) - (1.5 / (pow(a, 2.0) * t_0))));
} else {
tmp = fma(((a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, (a - 0.3333333333333333));
}
return tmp;
}
function code(a, rand) t_0 = sqrt(Float64(9.0 / a)) t_1 = Float64(rand * Float64(a - 0.3333333333333333)) tmp = 0.0 if (a <= -4.1e+157) tmp = Float64(t_1 / sqrt(sqrt(Float64(fma(9.0, a, -3.0) * fma(9.0, a, -3.0))))); elseif (a <= -0.33) tmp = Float64(Float64(fma(a, a, -0.1111111111111111) / Float64(fma(Float64(a * a), a, 0.037037037037037035) / fma(a, a, fma(-0.3333333333333333, a, 0.1111111111111111)))) * 1.0); elseif (a <= 1.55e-162) tmp = Float64(Float64((a ^ 2.0) / Float64(a - -0.3333333333333333)) * 1.0); elseif (a <= 3.2e+26) tmp = Float64(t_1 / Float64(a * Float64(Float64(t_0 + Float64(-1.0 * Float64(fma(1.6875, Float64(1.0 / Float64((a ^ 2.0) * (t_0 ^ 5.0))), Float64(1.125 * Float64(1.0 / (t_0 ^ 3.0)))) / (a ^ 4.0)))) - Float64(1.5 / Float64((a ^ 2.0) * t_0))))); else tmp = fma(Float64(Float64(a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, Float64(a - 0.3333333333333333)); end return tmp end
code[a_, rand_] := Block[{t$95$0 = N[Sqrt[N[(9.0 / a), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(rand * N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.1e+157], N[(t$95$1 / N[Sqrt[N[Sqrt[N[(N[(9.0 * a + -3.0), $MachinePrecision] * N[(9.0 * a + -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -0.33], N[(N[(N[(a * a + -0.1111111111111111), $MachinePrecision] / N[(N[(N[(a * a), $MachinePrecision] * a + 0.037037037037037035), $MachinePrecision] / N[(a * a + N[(-0.3333333333333333 * a + 0.1111111111111111), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[a, 1.55e-162], N[(N[(N[Power[a, 2.0], $MachinePrecision] / N[(a - -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[a, 3.2e+26], N[(t$95$1 / N[(a * N[(N[(t$95$0 + N[(-1.0 * N[(N[(1.6875 * N[(1.0 / N[(N[Power[a, 2.0], $MachinePrecision] * N[Power[t$95$0, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.125 * N[(1.0 / N[Power[t$95$0, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[a, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(1.5 / N[(N[Power[a, 2.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a - 0.3333333333333333), $MachinePrecision] / N[Sqrt[N[(9.0 * a + -3.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand + N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_0 := \sqrt{\frac{9}{a}}\\
t_1 := rand \cdot \left(a - 0.3333333333333333\right)\\
\mathbf{if}\;a \leq -4.1 \cdot 10^{+157}:\\
\;\;\;\;\frac{t\_1}{\sqrt{\sqrt{\mathsf{fma}\left(9, a, -3\right) \cdot \mathsf{fma}\left(9, a, -3\right)}}}\\
\mathbf{elif}\;a \leq -0.33:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, a, -0.1111111111111111\right)}{\frac{\mathsf{fma}\left(a \cdot a, a, 0.037037037037037035\right)}{\mathsf{fma}\left(a, a, \mathsf{fma}\left(-0.3333333333333333, a, 0.1111111111111111\right)\right)}} \cdot 1\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-162}:\\
\;\;\;\;\frac{{a}^{2}}{a - -0.3333333333333333} \cdot 1\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{t\_1}{a \cdot \left(\left(t\_0 + -1 \cdot \frac{\mathsf{fma}\left(1.6875, \frac{1}{{a}^{2} \cdot {t\_0}^{5}}, 1.125 \cdot \frac{1}{{t\_0}^{3}}\right)}{{a}^{4}}\right) - \frac{1.5}{{a}^{2} \cdot t\_0}\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a - 0.3333333333333333}{\sqrt{\mathsf{fma}\left(9, a, -3\right)}}, rand, a - 0.3333333333333333\right)\\
\end{array}
if a < -4.1000000000000002e157Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
lift-sqrt.f64N/A
lift--.f64N/A
metadata-evalN/A
add-flipN/A
lift-*.f64N/A
sqrt-fabs-revN/A
rem-sqrt-square-revN/A
lower-sqrt.f64N/A
lift-*.f64N/A
add-flipN/A
metadata-evalN/A
lift--.f64N/A
lift-*.f64N/A
add-flipN/A
metadata-evalN/A
lift--.f64N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6414.8%
Applied rewrites14.8%
if -4.1000000000000002e157 < a < -0.33000000000000002Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
lift--.f64N/A
lift-/.f64N/A
metadata-evalN/A
flip--N/A
+-commutativeN/A
remove-sound-/N/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval10.8%
Applied rewrites10.8%
lift--.f64N/A
flip3--N/A
remove-sound-/N/A
lower-/.f64N/A
sub-flipN/A
cube-negN/A
metadata-evalN/A
unpow3N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-eval10.3%
Applied rewrites10.3%
if -0.33000000000000002 < a < 1.5499999999999999e-162Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
lift--.f64N/A
lift-/.f64N/A
metadata-evalN/A
flip--N/A
+-commutativeN/A
remove-sound-/N/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval10.8%
Applied rewrites10.8%
Taylor expanded in a around inf
lower-pow.f6435.7%
Applied rewrites35.7%
if 1.5499999999999999e-162 < a < 3.2000000000000003e26Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites12.3%
if 3.2000000000000003e26 < a Initial program 25.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites25.0%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (* rand (- a 0.3333333333333333))) (t_1 (sqrt (/ 9.0 a))))
(if (<= a -4.1e+157)
(/ t_0 (sqrt (sqrt (* (fma 9.0 a -3.0) (fma 9.0 a -3.0)))))
(if (<= a -0.33)
(*
(/
(fma a a -0.1111111111111111)
(/
(fma (* a a) a 0.037037037037037035)
(fma a a (fma -0.3333333333333333 a 0.1111111111111111))))
1.0)
(if (<= a 2e-205)
(* (/ (pow a 2.0) (- a -0.3333333333333333)) 1.0)
(if (<= a 3.2e+26)
(/
t_0
(*
a
(+
t_1
(*
-1.0
(/
(fma
1.5
(/ 1.0 t_1)
(* 1.125 (/ 1.0 (* (pow a 2.0) (pow t_1 3.0)))))
(pow a 2.0))))))
(fma
(/ (- a 0.3333333333333333) (sqrt (fma 9.0 a -3.0)))
rand
(- a 0.3333333333333333))))))))double code(double a, double rand) {
double t_0 = rand * (a - 0.3333333333333333);
double t_1 = sqrt((9.0 / a));
double tmp;
if (a <= -4.1e+157) {
tmp = t_0 / sqrt(sqrt((fma(9.0, a, -3.0) * fma(9.0, a, -3.0))));
} else if (a <= -0.33) {
tmp = (fma(a, a, -0.1111111111111111) / (fma((a * a), a, 0.037037037037037035) / fma(a, a, fma(-0.3333333333333333, a, 0.1111111111111111)))) * 1.0;
} else if (a <= 2e-205) {
tmp = (pow(a, 2.0) / (a - -0.3333333333333333)) * 1.0;
} else if (a <= 3.2e+26) {
tmp = t_0 / (a * (t_1 + (-1.0 * (fma(1.5, (1.0 / t_1), (1.125 * (1.0 / (pow(a, 2.0) * pow(t_1, 3.0))))) / pow(a, 2.0)))));
} else {
tmp = fma(((a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, (a - 0.3333333333333333));
}
return tmp;
}
function code(a, rand) t_0 = Float64(rand * Float64(a - 0.3333333333333333)) t_1 = sqrt(Float64(9.0 / a)) tmp = 0.0 if (a <= -4.1e+157) tmp = Float64(t_0 / sqrt(sqrt(Float64(fma(9.0, a, -3.0) * fma(9.0, a, -3.0))))); elseif (a <= -0.33) tmp = Float64(Float64(fma(a, a, -0.1111111111111111) / Float64(fma(Float64(a * a), a, 0.037037037037037035) / fma(a, a, fma(-0.3333333333333333, a, 0.1111111111111111)))) * 1.0); elseif (a <= 2e-205) tmp = Float64(Float64((a ^ 2.0) / Float64(a - -0.3333333333333333)) * 1.0); elseif (a <= 3.2e+26) tmp = Float64(t_0 / Float64(a * Float64(t_1 + Float64(-1.0 * Float64(fma(1.5, Float64(1.0 / t_1), Float64(1.125 * Float64(1.0 / Float64((a ^ 2.0) * (t_1 ^ 3.0))))) / (a ^ 2.0)))))); else tmp = fma(Float64(Float64(a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, Float64(a - 0.3333333333333333)); end return tmp end
code[a_, rand_] := Block[{t$95$0 = N[(rand * N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(9.0 / a), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[a, -4.1e+157], N[(t$95$0 / N[Sqrt[N[Sqrt[N[(N[(9.0 * a + -3.0), $MachinePrecision] * N[(9.0 * a + -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -0.33], N[(N[(N[(a * a + -0.1111111111111111), $MachinePrecision] / N[(N[(N[(a * a), $MachinePrecision] * a + 0.037037037037037035), $MachinePrecision] / N[(a * a + N[(-0.3333333333333333 * a + 0.1111111111111111), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[a, 2e-205], N[(N[(N[Power[a, 2.0], $MachinePrecision] / N[(a - -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[a, 3.2e+26], N[(t$95$0 / N[(a * N[(t$95$1 + N[(-1.0 * N[(N[(1.5 * N[(1.0 / t$95$1), $MachinePrecision] + N[(1.125 * N[(1.0 / N[(N[Power[a, 2.0], $MachinePrecision] * N[Power[t$95$1, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a - 0.3333333333333333), $MachinePrecision] / N[Sqrt[N[(9.0 * a + -3.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand + N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_0 := rand \cdot \left(a - 0.3333333333333333\right)\\
t_1 := \sqrt{\frac{9}{a}}\\
\mathbf{if}\;a \leq -4.1 \cdot 10^{+157}:\\
\;\;\;\;\frac{t\_0}{\sqrt{\sqrt{\mathsf{fma}\left(9, a, -3\right) \cdot \mathsf{fma}\left(9, a, -3\right)}}}\\
\mathbf{elif}\;a \leq -0.33:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, a, -0.1111111111111111\right)}{\frac{\mathsf{fma}\left(a \cdot a, a, 0.037037037037037035\right)}{\mathsf{fma}\left(a, a, \mathsf{fma}\left(-0.3333333333333333, a, 0.1111111111111111\right)\right)}} \cdot 1\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-205}:\\
\;\;\;\;\frac{{a}^{2}}{a - -0.3333333333333333} \cdot 1\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{t\_0}{a \cdot \left(t\_1 + -1 \cdot \frac{\mathsf{fma}\left(1.5, \frac{1}{t\_1}, 1.125 \cdot \frac{1}{{a}^{2} \cdot {t\_1}^{3}}\right)}{{a}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a - 0.3333333333333333}{\sqrt{\mathsf{fma}\left(9, a, -3\right)}}, rand, a - 0.3333333333333333\right)\\
\end{array}
if a < -4.1000000000000002e157Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
lift-sqrt.f64N/A
lift--.f64N/A
metadata-evalN/A
add-flipN/A
lift-*.f64N/A
sqrt-fabs-revN/A
rem-sqrt-square-revN/A
lower-sqrt.f64N/A
lift-*.f64N/A
add-flipN/A
metadata-evalN/A
lift--.f64N/A
lift-*.f64N/A
add-flipN/A
metadata-evalN/A
lift--.f64N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6414.8%
Applied rewrites14.8%
if -4.1000000000000002e157 < a < -0.33000000000000002Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
lift--.f64N/A
lift-/.f64N/A
metadata-evalN/A
flip--N/A
+-commutativeN/A
remove-sound-/N/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval10.8%
Applied rewrites10.8%
lift--.f64N/A
flip3--N/A
remove-sound-/N/A
lower-/.f64N/A
sub-flipN/A
cube-negN/A
metadata-evalN/A
unpow3N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-eval10.3%
Applied rewrites10.3%
if -0.33000000000000002 < a < 2e-205Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
lift--.f64N/A
lift-/.f64N/A
metadata-evalN/A
flip--N/A
+-commutativeN/A
remove-sound-/N/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval10.8%
Applied rewrites10.8%
Taylor expanded in a around inf
lower-pow.f6435.7%
Applied rewrites35.7%
if 2e-205 < a < 3.2000000000000003e26Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
Taylor expanded in a around inf
lower-*.f64N/A
lower-+.f64N/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites13.9%
if 3.2000000000000003e26 < a Initial program 25.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites25.0%
(FPCore (a rand)
:precision binary64
(if (<= a -4.1e+157)
(/
(* rand (- a 0.3333333333333333))
(sqrt (sqrt (* (fma 9.0 a -3.0) (fma 9.0 a -3.0)))))
(if (<= a -0.33)
(*
(/
(fma a a -0.1111111111111111)
(/
(fma (* a a) a 0.037037037037037035)
(fma a a (fma -0.3333333333333333 a 0.1111111111111111))))
1.0)
(if (<= a 0.35)
(* (/ (pow a 2.0) (- a -0.3333333333333333)) 1.0)
(fma
(/ (- a 0.3333333333333333) (sqrt (fma 9.0 a -3.0)))
rand
(- a 0.3333333333333333))))))double code(double a, double rand) {
double tmp;
if (a <= -4.1e+157) {
tmp = (rand * (a - 0.3333333333333333)) / sqrt(sqrt((fma(9.0, a, -3.0) * fma(9.0, a, -3.0))));
} else if (a <= -0.33) {
tmp = (fma(a, a, -0.1111111111111111) / (fma((a * a), a, 0.037037037037037035) / fma(a, a, fma(-0.3333333333333333, a, 0.1111111111111111)))) * 1.0;
} else if (a <= 0.35) {
tmp = (pow(a, 2.0) / (a - -0.3333333333333333)) * 1.0;
} else {
tmp = fma(((a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, (a - 0.3333333333333333));
}
return tmp;
}
function code(a, rand) tmp = 0.0 if (a <= -4.1e+157) tmp = Float64(Float64(rand * Float64(a - 0.3333333333333333)) / sqrt(sqrt(Float64(fma(9.0, a, -3.0) * fma(9.0, a, -3.0))))); elseif (a <= -0.33) tmp = Float64(Float64(fma(a, a, -0.1111111111111111) / Float64(fma(Float64(a * a), a, 0.037037037037037035) / fma(a, a, fma(-0.3333333333333333, a, 0.1111111111111111)))) * 1.0); elseif (a <= 0.35) tmp = Float64(Float64((a ^ 2.0) / Float64(a - -0.3333333333333333)) * 1.0); else tmp = fma(Float64(Float64(a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, Float64(a - 0.3333333333333333)); end return tmp end
code[a_, rand_] := If[LessEqual[a, -4.1e+157], N[(N[(rand * N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[Sqrt[N[(N[(9.0 * a + -3.0), $MachinePrecision] * N[(9.0 * a + -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -0.33], N[(N[(N[(a * a + -0.1111111111111111), $MachinePrecision] / N[(N[(N[(a * a), $MachinePrecision] * a + 0.037037037037037035), $MachinePrecision] / N[(a * a + N[(-0.3333333333333333 * a + 0.1111111111111111), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[a, 0.35], N[(N[(N[Power[a, 2.0], $MachinePrecision] / N[(a - -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[(a - 0.3333333333333333), $MachinePrecision] / N[Sqrt[N[(9.0 * a + -3.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand + N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{+157}:\\
\;\;\;\;\frac{rand \cdot \left(a - 0.3333333333333333\right)}{\sqrt{\sqrt{\mathsf{fma}\left(9, a, -3\right) \cdot \mathsf{fma}\left(9, a, -3\right)}}}\\
\mathbf{elif}\;a \leq -0.33:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, a, -0.1111111111111111\right)}{\frac{\mathsf{fma}\left(a \cdot a, a, 0.037037037037037035\right)}{\mathsf{fma}\left(a, a, \mathsf{fma}\left(-0.3333333333333333, a, 0.1111111111111111\right)\right)}} \cdot 1\\
\mathbf{elif}\;a \leq 0.35:\\
\;\;\;\;\frac{{a}^{2}}{a - -0.3333333333333333} \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a - 0.3333333333333333}{\sqrt{\mathsf{fma}\left(9, a, -3\right)}}, rand, a - 0.3333333333333333\right)\\
\end{array}
if a < -4.1000000000000002e157Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
lift-sqrt.f64N/A
lift--.f64N/A
metadata-evalN/A
add-flipN/A
lift-*.f64N/A
sqrt-fabs-revN/A
rem-sqrt-square-revN/A
lower-sqrt.f64N/A
lift-*.f64N/A
add-flipN/A
metadata-evalN/A
lift--.f64N/A
lift-*.f64N/A
add-flipN/A
metadata-evalN/A
lift--.f64N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6414.8%
Applied rewrites14.8%
if -4.1000000000000002e157 < a < -0.33000000000000002Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
lift--.f64N/A
lift-/.f64N/A
metadata-evalN/A
flip--N/A
+-commutativeN/A
remove-sound-/N/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval10.8%
Applied rewrites10.8%
lift--.f64N/A
flip3--N/A
remove-sound-/N/A
lower-/.f64N/A
sub-flipN/A
cube-negN/A
metadata-evalN/A
unpow3N/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
metadata-eval10.3%
Applied rewrites10.3%
if -0.33000000000000002 < a < 0.34999999999999998Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
lift--.f64N/A
lift-/.f64N/A
metadata-evalN/A
flip--N/A
+-commutativeN/A
remove-sound-/N/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval10.8%
Applied rewrites10.8%
Taylor expanded in a around inf
lower-pow.f6435.7%
Applied rewrites35.7%
if 0.34999999999999998 < a Initial program 25.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites25.0%
(FPCore (a rand)
:precision binary64
(if (<= a -3.2e-69)
(/
(* rand (- a 0.3333333333333333))
(sqrt (sqrt (* (fma 9.0 a -3.0) (fma 9.0 a -3.0)))))
(if (<= a 0.35)
(* (/ (pow a 2.0) (- a -0.3333333333333333)) 1.0)
(fma
(/ (- a 0.3333333333333333) (sqrt (fma 9.0 a -3.0)))
rand
(- a 0.3333333333333333)))))double code(double a, double rand) {
double tmp;
if (a <= -3.2e-69) {
tmp = (rand * (a - 0.3333333333333333)) / sqrt(sqrt((fma(9.0, a, -3.0) * fma(9.0, a, -3.0))));
} else if (a <= 0.35) {
tmp = (pow(a, 2.0) / (a - -0.3333333333333333)) * 1.0;
} else {
tmp = fma(((a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, (a - 0.3333333333333333));
}
return tmp;
}
function code(a, rand) tmp = 0.0 if (a <= -3.2e-69) tmp = Float64(Float64(rand * Float64(a - 0.3333333333333333)) / sqrt(sqrt(Float64(fma(9.0, a, -3.0) * fma(9.0, a, -3.0))))); elseif (a <= 0.35) tmp = Float64(Float64((a ^ 2.0) / Float64(a - -0.3333333333333333)) * 1.0); else tmp = fma(Float64(Float64(a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, Float64(a - 0.3333333333333333)); end return tmp end
code[a_, rand_] := If[LessEqual[a, -3.2e-69], N[(N[(rand * N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[Sqrt[N[(N[(9.0 * a + -3.0), $MachinePrecision] * N[(9.0 * a + -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.35], N[(N[(N[Power[a, 2.0], $MachinePrecision] / N[(a - -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[(a - 0.3333333333333333), $MachinePrecision] / N[Sqrt[N[(9.0 * a + -3.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand + N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{-69}:\\
\;\;\;\;\frac{rand \cdot \left(a - 0.3333333333333333\right)}{\sqrt{\sqrt{\mathsf{fma}\left(9, a, -3\right) \cdot \mathsf{fma}\left(9, a, -3\right)}}}\\
\mathbf{elif}\;a \leq 0.35:\\
\;\;\;\;\frac{{a}^{2}}{a - -0.3333333333333333} \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a - 0.3333333333333333}{\sqrt{\mathsf{fma}\left(9, a, -3\right)}}, rand, a - 0.3333333333333333\right)\\
\end{array}
if a < -3.2e-69Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
lift-sqrt.f64N/A
lift--.f64N/A
metadata-evalN/A
add-flipN/A
lift-*.f64N/A
sqrt-fabs-revN/A
rem-sqrt-square-revN/A
lower-sqrt.f64N/A
lift-*.f64N/A
add-flipN/A
metadata-evalN/A
lift--.f64N/A
lift-*.f64N/A
add-flipN/A
metadata-evalN/A
lift--.f64N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6414.8%
Applied rewrites14.8%
if -3.2e-69 < a < 0.34999999999999998Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
lift--.f64N/A
lift-/.f64N/A
metadata-evalN/A
flip--N/A
+-commutativeN/A
remove-sound-/N/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval10.8%
Applied rewrites10.8%
Taylor expanded in a around inf
lower-pow.f6435.7%
Applied rewrites35.7%
if 0.34999999999999998 < a Initial program 25.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites25.0%
(FPCore (a rand)
:precision binary64
(if (<= a -2e-310)
(/
(* rand (- a 0.3333333333333333))
(sqrt (sqrt (* (fma 9.0 a -3.0) (fma 9.0 a -3.0)))))
(if (<= a 10000.0)
(/ rand (sqrt (/ 9.0 a)))
(fma
(/ (- a 0.3333333333333333) (sqrt (fma 9.0 a -3.0)))
rand
(- a 0.3333333333333333)))))double code(double a, double rand) {
double tmp;
if (a <= -2e-310) {
tmp = (rand * (a - 0.3333333333333333)) / sqrt(sqrt((fma(9.0, a, -3.0) * fma(9.0, a, -3.0))));
} else if (a <= 10000.0) {
tmp = rand / sqrt((9.0 / a));
} else {
tmp = fma(((a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, (a - 0.3333333333333333));
}
return tmp;
}
function code(a, rand) tmp = 0.0 if (a <= -2e-310) tmp = Float64(Float64(rand * Float64(a - 0.3333333333333333)) / sqrt(sqrt(Float64(fma(9.0, a, -3.0) * fma(9.0, a, -3.0))))); elseif (a <= 10000.0) tmp = Float64(rand / sqrt(Float64(9.0 / a))); else tmp = fma(Float64(Float64(a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, Float64(a - 0.3333333333333333)); end return tmp end
code[a_, rand_] := If[LessEqual[a, -2e-310], N[(N[(rand * N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[Sqrt[N[(N[(9.0 * a + -3.0), $MachinePrecision] * N[(9.0 * a + -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 10000.0], N[(rand / N[Sqrt[N[(9.0 / a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(a - 0.3333333333333333), $MachinePrecision] / N[Sqrt[N[(9.0 * a + -3.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand + N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\frac{rand \cdot \left(a - 0.3333333333333333\right)}{\sqrt{\sqrt{\mathsf{fma}\left(9, a, -3\right) \cdot \mathsf{fma}\left(9, a, -3\right)}}}\\
\mathbf{elif}\;a \leq 10000:\\
\;\;\;\;\frac{rand}{\sqrt{\frac{9}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a - 0.3333333333333333}{\sqrt{\mathsf{fma}\left(9, a, -3\right)}}, rand, a - 0.3333333333333333\right)\\
\end{array}
if a < -1.9999999999999939e-310Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
lift-sqrt.f64N/A
lift--.f64N/A
metadata-evalN/A
add-flipN/A
lift-*.f64N/A
sqrt-fabs-revN/A
rem-sqrt-square-revN/A
lower-sqrt.f64N/A
lift-*.f64N/A
add-flipN/A
metadata-evalN/A
lift--.f64N/A
lift-*.f64N/A
add-flipN/A
metadata-evalN/A
lift--.f64N/A
sqrt-unprodN/A
lower-sqrt.f64N/A
lower-*.f6414.8%
Applied rewrites14.8%
if -1.9999999999999939e-310 < a < 1e4Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6413.2%
Applied rewrites13.2%
if 1e4 < a Initial program 25.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites25.0%
(FPCore (a rand)
:precision binary64
(if (<= a -2e-310)
(*
(fma 0.3333333333333333 a -0.1111111111111111)
(/ rand (sqrt (fabs (- 0.3333333333333333 a)))))
(if (<= a 10000.0)
(/ rand (sqrt (/ 9.0 a)))
(fma
(/ (- a 0.3333333333333333) (sqrt (fma 9.0 a -3.0)))
rand
(- a 0.3333333333333333)))))double code(double a, double rand) {
double tmp;
if (a <= -2e-310) {
tmp = fma(0.3333333333333333, a, -0.1111111111111111) * (rand / sqrt(fabs((0.3333333333333333 - a))));
} else if (a <= 10000.0) {
tmp = rand / sqrt((9.0 / a));
} else {
tmp = fma(((a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, (a - 0.3333333333333333));
}
return tmp;
}
function code(a, rand) tmp = 0.0 if (a <= -2e-310) tmp = Float64(fma(0.3333333333333333, a, -0.1111111111111111) * Float64(rand / sqrt(abs(Float64(0.3333333333333333 - a))))); elseif (a <= 10000.0) tmp = Float64(rand / sqrt(Float64(9.0 / a))); else tmp = fma(Float64(Float64(a - 0.3333333333333333) / sqrt(fma(9.0, a, -3.0))), rand, Float64(a - 0.3333333333333333)); end return tmp end
code[a_, rand_] := If[LessEqual[a, -2e-310], N[(N[(0.3333333333333333 * a + -0.1111111111111111), $MachinePrecision] * N[(rand / N[Sqrt[N[Abs[N[(0.3333333333333333 - a), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 10000.0], N[(rand / N[Sqrt[N[(9.0 / a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(a - 0.3333333333333333), $MachinePrecision] / N[Sqrt[N[(9.0 * a + -3.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand + N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(0.3333333333333333, a, -0.1111111111111111\right) \cdot \frac{rand}{\sqrt{\left|0.3333333333333333 - a\right|}}\\
\mathbf{elif}\;a \leq 10000:\\
\;\;\;\;\frac{rand}{\sqrt{\frac{9}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a - 0.3333333333333333}{\sqrt{\mathsf{fma}\left(9, a, -3\right)}}, rand, a - 0.3333333333333333\right)\\
\end{array}
if a < -1.9999999999999939e-310Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift--.f64N/A
metadata-evalN/A
add-flipN/A
lift-*.f64N/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
sub-flipN/A
sqrt-prodN/A
metadata-evalN/A
metadata-evalN/A
fabs-subN/A
frac-timesN/A
lower-*.f64N/A
Applied rewrites14.3%
if -1.9999999999999939e-310 < a < 1e4Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6413.2%
Applied rewrites13.2%
if 1e4 < a Initial program 25.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites25.0%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (sqrt (fabs (- 0.3333333333333333 a)))))
(if (<= a -2e-310)
(* (fma 0.3333333333333333 a -0.1111111111111111) (/ rand t_0))
(if (<= a 10000.0)
(/ rand (sqrt (/ 9.0 a)))
(*
(fma (/ -0.3333333333333333 t_0) rand -1.0)
(- 0.3333333333333333 a))))))double code(double a, double rand) {
double t_0 = sqrt(fabs((0.3333333333333333 - a)));
double tmp;
if (a <= -2e-310) {
tmp = fma(0.3333333333333333, a, -0.1111111111111111) * (rand / t_0);
} else if (a <= 10000.0) {
tmp = rand / sqrt((9.0 / a));
} else {
tmp = fma((-0.3333333333333333 / t_0), rand, -1.0) * (0.3333333333333333 - a);
}
return tmp;
}
function code(a, rand) t_0 = sqrt(abs(Float64(0.3333333333333333 - a))) tmp = 0.0 if (a <= -2e-310) tmp = Float64(fma(0.3333333333333333, a, -0.1111111111111111) * Float64(rand / t_0)); elseif (a <= 10000.0) tmp = Float64(rand / sqrt(Float64(9.0 / a))); else tmp = Float64(fma(Float64(-0.3333333333333333 / t_0), rand, -1.0) * Float64(0.3333333333333333 - a)); end return tmp end
code[a_, rand_] := Block[{t$95$0 = N[Sqrt[N[Abs[N[(0.3333333333333333 - a), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[a, -2e-310], N[(N[(0.3333333333333333 * a + -0.1111111111111111), $MachinePrecision] * N[(rand / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 10000.0], N[(rand / N[Sqrt[N[(9.0 / a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.3333333333333333 / t$95$0), $MachinePrecision] * rand + -1.0), $MachinePrecision] * N[(0.3333333333333333 - a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \sqrt{\left|0.3333333333333333 - a\right|}\\
\mathbf{if}\;a \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(0.3333333333333333, a, -0.1111111111111111\right) \cdot \frac{rand}{t\_0}\\
\mathbf{elif}\;a \leq 10000:\\
\;\;\;\;\frac{rand}{\sqrt{\frac{9}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-0.3333333333333333}{t\_0}, rand, -1\right) \cdot \left(0.3333333333333333 - a\right)\\
\end{array}
if a < -1.9999999999999939e-310Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift--.f64N/A
metadata-evalN/A
add-flipN/A
lift-*.f64N/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
sub-flipN/A
sqrt-prodN/A
metadata-evalN/A
metadata-evalN/A
fabs-subN/A
frac-timesN/A
lower-*.f64N/A
Applied rewrites14.3%
if -1.9999999999999939e-310 < a < 1e4Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6413.2%
Applied rewrites13.2%
if 1e4 < a Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
lift-+.f64N/A
add-flipN/A
sub-negate-revN/A
lower-*.f64N/A
Applied rewrites26.9%
(FPCore (a rand)
:precision binary64
(if (<= a -2e-310)
(*
(fma 0.3333333333333333 a -0.1111111111111111)
(/ rand (sqrt (fabs (- 0.3333333333333333 a)))))
(if (<= a 10000.0)
(/ rand (sqrt (/ 9.0 a)))
(*
(- (/ rand (sqrt (fma 9.0 a -3.0))) -1.0)
(- a 0.3333333333333333)))))double code(double a, double rand) {
double tmp;
if (a <= -2e-310) {
tmp = fma(0.3333333333333333, a, -0.1111111111111111) * (rand / sqrt(fabs((0.3333333333333333 - a))));
} else if (a <= 10000.0) {
tmp = rand / sqrt((9.0 / a));
} else {
tmp = ((rand / sqrt(fma(9.0, a, -3.0))) - -1.0) * (a - 0.3333333333333333);
}
return tmp;
}
function code(a, rand) tmp = 0.0 if (a <= -2e-310) tmp = Float64(fma(0.3333333333333333, a, -0.1111111111111111) * Float64(rand / sqrt(abs(Float64(0.3333333333333333 - a))))); elseif (a <= 10000.0) tmp = Float64(rand / sqrt(Float64(9.0 / a))); else tmp = Float64(Float64(Float64(rand / sqrt(fma(9.0, a, -3.0))) - -1.0) * Float64(a - 0.3333333333333333)); end return tmp end
code[a_, rand_] := If[LessEqual[a, -2e-310], N[(N[(0.3333333333333333 * a + -0.1111111111111111), $MachinePrecision] * N[(rand / N[Sqrt[N[Abs[N[(0.3333333333333333 - a), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 10000.0], N[(rand / N[Sqrt[N[(9.0 / a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(rand / N[Sqrt[N[(9.0 * a + -3.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision] * N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(0.3333333333333333, a, -0.1111111111111111\right) \cdot \frac{rand}{\sqrt{\left|0.3333333333333333 - a\right|}}\\
\mathbf{elif}\;a \leq 10000:\\
\;\;\;\;\frac{rand}{\sqrt{\frac{9}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{rand}{\sqrt{\mathsf{fma}\left(9, a, -3\right)}} - -1\right) \cdot \left(a - 0.3333333333333333\right)\\
\end{array}
if a < -1.9999999999999939e-310Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift--.f64N/A
metadata-evalN/A
add-flipN/A
lift-*.f64N/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
sub-flipN/A
sqrt-prodN/A
metadata-evalN/A
metadata-evalN/A
fabs-subN/A
frac-timesN/A
lower-*.f64N/A
Applied rewrites14.3%
if -1.9999999999999939e-310 < a < 1e4Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6413.2%
Applied rewrites13.2%
if 1e4 < a Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
(FPCore (a rand)
:precision binary64
(if (<= a -2e-310)
(*
(fma 0.3333333333333333 a -0.1111111111111111)
(/ rand (sqrt (fabs (- 0.3333333333333333 a)))))
(if (<= a 3.2e+26)
(/ rand (sqrt (/ 9.0 a)))
(fma (sqrt (/ (fabs a) 9.0)) rand (- a 0.3333333333333333)))))double code(double a, double rand) {
double tmp;
if (a <= -2e-310) {
tmp = fma(0.3333333333333333, a, -0.1111111111111111) * (rand / sqrt(fabs((0.3333333333333333 - a))));
} else if (a <= 3.2e+26) {
tmp = rand / sqrt((9.0 / a));
} else {
tmp = fma(sqrt((fabs(a) / 9.0)), rand, (a - 0.3333333333333333));
}
return tmp;
}
function code(a, rand) tmp = 0.0 if (a <= -2e-310) tmp = Float64(fma(0.3333333333333333, a, -0.1111111111111111) * Float64(rand / sqrt(abs(Float64(0.3333333333333333 - a))))); elseif (a <= 3.2e+26) tmp = Float64(rand / sqrt(Float64(9.0 / a))); else tmp = fma(sqrt(Float64(abs(a) / 9.0)), rand, Float64(a - 0.3333333333333333)); end return tmp end
code[a_, rand_] := If[LessEqual[a, -2e-310], N[(N[(0.3333333333333333 * a + -0.1111111111111111), $MachinePrecision] * N[(rand / N[Sqrt[N[Abs[N[(0.3333333333333333 - a), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+26], N[(rand / N[Sqrt[N[(9.0 / a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[Abs[a], $MachinePrecision] / 9.0), $MachinePrecision]], $MachinePrecision] * rand + N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\mathsf{fma}\left(0.3333333333333333, a, -0.1111111111111111\right) \cdot \frac{rand}{\sqrt{\left|0.3333333333333333 - a\right|}}\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{rand}{\sqrt{\frac{9}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{\frac{\left|a\right|}{9}}, rand, a - 0.3333333333333333\right)\\
\end{array}
if a < -1.9999999999999939e-310Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift--.f64N/A
metadata-evalN/A
add-flipN/A
lift-*.f64N/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
sub-flipN/A
sqrt-prodN/A
metadata-evalN/A
metadata-evalN/A
fabs-subN/A
frac-timesN/A
lower-*.f64N/A
Applied rewrites14.3%
if -1.9999999999999939e-310 < a < 3.2000000000000003e26Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6413.2%
Applied rewrites13.2%
if 3.2000000000000003e26 < a Initial program 25.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites25.0%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6425.5%
Applied rewrites25.5%
lift-/.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
metadata-evalN/A
div-flip-revN/A
metadata-evalN/A
sqrt-undivN/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-fabs.f6426.7%
Applied rewrites26.7%
(FPCore (a rand)
:precision binary64
(if (<= a 2.05e-305)
(* (/ -0.1111111111111111 (- a -0.3333333333333333)) 1.0)
(if (<= a 3.2e+26)
(/ rand (sqrt (/ 9.0 a)))
(fma (sqrt (/ (fabs a) 9.0)) rand (- a 0.3333333333333333)))))double code(double a, double rand) {
double tmp;
if (a <= 2.05e-305) {
tmp = (-0.1111111111111111 / (a - -0.3333333333333333)) * 1.0;
} else if (a <= 3.2e+26) {
tmp = rand / sqrt((9.0 / a));
} else {
tmp = fma(sqrt((fabs(a) / 9.0)), rand, (a - 0.3333333333333333));
}
return tmp;
}
function code(a, rand) tmp = 0.0 if (a <= 2.05e-305) tmp = Float64(Float64(-0.1111111111111111 / Float64(a - -0.3333333333333333)) * 1.0); elseif (a <= 3.2e+26) tmp = Float64(rand / sqrt(Float64(9.0 / a))); else tmp = fma(sqrt(Float64(abs(a) / 9.0)), rand, Float64(a - 0.3333333333333333)); end return tmp end
code[a_, rand_] := If[LessEqual[a, 2.05e-305], N[(N[(-0.1111111111111111 / N[(a - -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[a, 3.2e+26], N[(rand / N[Sqrt[N[(9.0 / a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[Abs[a], $MachinePrecision] / 9.0), $MachinePrecision]], $MachinePrecision] * rand + N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;a \leq 2.05 \cdot 10^{-305}:\\
\;\;\;\;\frac{-0.1111111111111111}{a - -0.3333333333333333} \cdot 1\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{rand}{\sqrt{\frac{9}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{\frac{\left|a\right|}{9}}, rand, a - 0.3333333333333333\right)\\
\end{array}
if a < 2.0500000000000001e-305Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
lift--.f64N/A
lift-/.f64N/A
metadata-evalN/A
flip--N/A
+-commutativeN/A
remove-sound-/N/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval10.8%
Applied rewrites10.8%
Taylor expanded in a around 0
Applied rewrites3.3%
if 2.0500000000000001e-305 < a < 3.2000000000000003e26Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6413.2%
Applied rewrites13.2%
if 3.2000000000000003e26 < a Initial program 25.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites25.0%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6425.5%
Applied rewrites25.5%
lift-/.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
metadata-evalN/A
div-flip-revN/A
metadata-evalN/A
sqrt-undivN/A
lower-sqrt.f64N/A
lower-/.f64N/A
lower-fabs.f6426.7%
Applied rewrites26.7%
(FPCore (a rand)
:precision binary64
(if (<= a 2.05e-305)
(* (/ -0.1111111111111111 (- a -0.3333333333333333)) 1.0)
(if (<= a 3.2e+26)
(/ rand (sqrt (/ 9.0 a)))
(fma
(* 0.3333333333333333 (sqrt (fabs a)))
rand
(- a 0.3333333333333333)))))double code(double a, double rand) {
double tmp;
if (a <= 2.05e-305) {
tmp = (-0.1111111111111111 / (a - -0.3333333333333333)) * 1.0;
} else if (a <= 3.2e+26) {
tmp = rand / sqrt((9.0 / a));
} else {
tmp = fma((0.3333333333333333 * sqrt(fabs(a))), rand, (a - 0.3333333333333333));
}
return tmp;
}
function code(a, rand) tmp = 0.0 if (a <= 2.05e-305) tmp = Float64(Float64(-0.1111111111111111 / Float64(a - -0.3333333333333333)) * 1.0); elseif (a <= 3.2e+26) tmp = Float64(rand / sqrt(Float64(9.0 / a))); else tmp = fma(Float64(0.3333333333333333 * sqrt(abs(a))), rand, Float64(a - 0.3333333333333333)); end return tmp end
code[a_, rand_] := If[LessEqual[a, 2.05e-305], N[(N[(-0.1111111111111111 / N[(a - -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[a, 3.2e+26], N[(rand / N[Sqrt[N[(9.0 / a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 * N[Sqrt[N[Abs[a], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * rand + N[(a - 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;a \leq 2.05 \cdot 10^{-305}:\\
\;\;\;\;\frac{-0.1111111111111111}{a - -0.3333333333333333} \cdot 1\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{rand}{\sqrt{\frac{9}{a}}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.3333333333333333 \cdot \sqrt{\left|a\right|}, rand, a - 0.3333333333333333\right)\\
\end{array}
if a < 2.0500000000000001e-305Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
lift--.f64N/A
lift-/.f64N/A
metadata-evalN/A
flip--N/A
+-commutativeN/A
remove-sound-/N/A
lower-/.f64N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-fma.f64N/A
metadata-evalN/A
metadata-evalN/A
+-commutativeN/A
add-flipN/A
lower--.f64N/A
metadata-eval10.8%
Applied rewrites10.8%
Taylor expanded in a around 0
Applied rewrites3.3%
if 2.0500000000000001e-305 < a < 3.2000000000000003e26Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6413.2%
Applied rewrites13.2%
if 3.2000000000000003e26 < a Initial program 25.0%
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites25.0%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6425.5%
Applied rewrites25.5%
lift-/.f64N/A
lift-sqrt.f64N/A
lift-/.f64N/A
sqrt-divN/A
metadata-evalN/A
metadata-evalN/A
associate-/r/N/A
metadata-evalN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-fabs.f6426.7%
Applied rewrites26.7%
(FPCore (a rand)
:precision binary64
(let* ((t_0 (/ rand (sqrt (/ 9.0 a)))))
(if (<= rand -8.9e+46)
t_0
(if (<= rand 4.2e+56) (* (* a 1.0) 1.0) t_0))))double code(double a, double rand) {
double t_0 = rand / sqrt((9.0 / a));
double tmp;
if (rand <= -8.9e+46) {
tmp = t_0;
} else if (rand <= 4.2e+56) {
tmp = (a * 1.0) * 1.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(a, rand)
use fmin_fmax_functions
real(8), intent (in) :: a
real(8), intent (in) :: rand
real(8) :: t_0
real(8) :: tmp
t_0 = rand / sqrt((9.0d0 / a))
if (rand <= (-8.9d+46)) then
tmp = t_0
else if (rand <= 4.2d+56) then
tmp = (a * 1.0d0) * 1.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double a, double rand) {
double t_0 = rand / Math.sqrt((9.0 / a));
double tmp;
if (rand <= -8.9e+46) {
tmp = t_0;
} else if (rand <= 4.2e+56) {
tmp = (a * 1.0) * 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(a, rand): t_0 = rand / math.sqrt((9.0 / a)) tmp = 0 if rand <= -8.9e+46: tmp = t_0 elif rand <= 4.2e+56: tmp = (a * 1.0) * 1.0 else: tmp = t_0 return tmp
function code(a, rand) t_0 = Float64(rand / sqrt(Float64(9.0 / a))) tmp = 0.0 if (rand <= -8.9e+46) tmp = t_0; elseif (rand <= 4.2e+56) tmp = Float64(Float64(a * 1.0) * 1.0); else tmp = t_0; end return tmp end
function tmp_2 = code(a, rand) t_0 = rand / sqrt((9.0 / a)); tmp = 0.0; if (rand <= -8.9e+46) tmp = t_0; elseif (rand <= 4.2e+56) tmp = (a * 1.0) * 1.0; else tmp = t_0; end tmp_2 = tmp; end
code[a_, rand_] := Block[{t$95$0 = N[(rand / N[Sqrt[N[(9.0 / a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[rand, -8.9e+46], t$95$0, If[LessEqual[rand, 4.2e+56], N[(N[(a * 1.0), $MachinePrecision] * 1.0), $MachinePrecision], t$95$0]]]
\begin{array}{l}
t_0 := \frac{rand}{\sqrt{\frac{9}{a}}}\\
\mathbf{if}\;rand \leq -8.9 \cdot 10^{+46}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;rand \leq 4.2 \cdot 10^{+56}:\\
\;\;\;\;\left(a \cdot 1\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
if rand < -8.8999999999999997e46 or 4.2000000000000003e56 < rand Initial program 25.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6425.0%
Applied rewrites25.0%
Taylor expanded in rand around inf
metadata-evalN/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lower-sqrt.f64N/A
lower--.f64N/A
lower-*.f647.6%
Applied rewrites7.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower-sqrt.f64N/A
lower-/.f6413.2%
Applied rewrites13.2%
if -8.8999999999999997e46 < rand < 4.2000000000000003e56Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
Taylor expanded in a around inf
metadata-evalN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f6418.0%
Applied rewrites18.0%
Taylor expanded in a around inf
Applied rewrites18.9%
(FPCore (a rand) :precision binary64 (* (* a 1.0) 1.0))
double code(double a, double rand) {
return (a * 1.0) * 1.0;
}
real(8) function code(a, rand)
use fmin_fmax_functions
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = (a * 1.0d0) * 1.0d0
end function
public static double code(double a, double rand) {
return (a * 1.0) * 1.0;
}
def code(a, rand): return (a * 1.0) * 1.0
function code(a, rand) return Float64(Float64(a * 1.0) * 1.0) end
function tmp = code(a, rand) tmp = (a * 1.0) * 1.0; end
code[a_, rand_] := N[(N[(a * 1.0), $MachinePrecision] * 1.0), $MachinePrecision]
\left(a \cdot 1\right) \cdot 1
Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
Taylor expanded in a around inf
metadata-evalN/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
metadata-evalN/A
lower-/.f6418.0%
Applied rewrites18.0%
Taylor expanded in a around inf
Applied rewrites18.9%
(FPCore (a rand) :precision binary64 (* (- a 0.3333333333333333) 1.0))
double code(double a, double rand) {
return (a - 0.3333333333333333) * 1.0;
}
real(8) function code(a, rand)
use fmin_fmax_functions
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = (a - 0.3333333333333333d0) * 1.0d0
end function
public static double code(double a, double rand) {
return (a - 0.3333333333333333) * 1.0;
}
def code(a, rand): return (a - 0.3333333333333333) * 1.0
function code(a, rand) return Float64(Float64(a - 0.3333333333333333) * 1.0) end
function tmp = code(a, rand) tmp = (a - 0.3333333333333333) * 1.0; end
code[a_, rand_] := N[(N[(a - 0.3333333333333333), $MachinePrecision] * 1.0), $MachinePrecision]
\left(a - 0.3333333333333333\right) \cdot 1
Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
lift-/.f64N/A
metadata-eval18.0%
Applied rewrites18.0%
(FPCore (a rand) :precision binary64 (* -0.3333333333333333 1.0))
double code(double a, double rand) {
return -0.3333333333333333 * 1.0;
}
real(8) function code(a, rand)
use fmin_fmax_functions
real(8), intent (in) :: a
real(8), intent (in) :: rand
code = (-0.3333333333333333d0) * 1.0d0
end function
public static double code(double a, double rand) {
return -0.3333333333333333 * 1.0;
}
def code(a, rand): return -0.3333333333333333 * 1.0
function code(a, rand) return Float64(-0.3333333333333333 * 1.0) end
function tmp = code(a, rand) tmp = -0.3333333333333333 * 1.0; end
code[a_, rand_] := N[(-0.3333333333333333 * 1.0), $MachinePrecision]
-0.3333333333333333 \cdot 1
Initial program 25.0%
Taylor expanded in a around inf
Applied rewrites18.0%
Taylor expanded in a around 0
Applied rewrites2.7%
herbie shell --seed 2025313 -o setup:search
(FPCore (a rand)
:name "Octave 3.8, oct_fill_randg"
:precision binary64
(* (- a (/ 1.0 3.0)) (+ 1.0 (* (/ 1.0 (sqrt (* 9.0 (- a (/ 1.0 3.0))))) rand))))