\left(a - \left(\frac{\left(1.0\right)}{\left(3.0\right)}\right)\right) \cdot \left(\frac{\left(1\right)}{\left(\left(\frac{\left(1\right)}{\left(\sqrt{\left(\left(9\right) \cdot \left(a - \left(\frac{\left(1.0\right)}{\left(3.0\right)}\right)\right)\right)}\right)}\right) \cdot rand\right)}\right)\frac{\left(\left(1\right) \cdot \left(a - \left(\frac{\left(1.0\right)}{\left(3.0\right)}\right)\right)\right)}{\left(\left(\left(\frac{\left(\left(\left(1\right) \cdot rand\right) \cdot \left(a - \left(\frac{\left(1.0\right)}{\left(3.0\right)}\right)\right)\right)}{\left(\sqrt{\left(\left(9\right) \cdot \left(a - \left(\frac{\left(1.0\right)}{\left(3.0\right)}\right)\right)\right)}\right)}\right)\right)\right)}double f(double a, double rand) {
double r3434409 = a;
double r3434410 = 1.0;
double r3434411 = /* ERROR: no posit support in C */;
double r3434412 = 3.0;
double r3434413 = /* ERROR: no posit support in C */;
double r3434414 = r3434411 / r3434413;
double r3434415 = r3434409 - r3434414;
double r3434416 = 1.0;
double r3434417 = /* ERROR: no posit support in C */;
double r3434418 = 9.0;
double r3434419 = /* ERROR: no posit support in C */;
double r3434420 = r3434419 * r3434415;
double r3434421 = sqrt(r3434420);
double r3434422 = r3434417 / r3434421;
double r3434423 = rand;
double r3434424 = r3434422 * r3434423;
double r3434425 = r3434417 + r3434424;
double r3434426 = r3434415 * r3434425;
return r3434426;
}
double f(double a, double rand) {
double r3434427 = 1.0;
double r3434428 = /* ERROR: no posit support in C */;
double r3434429 = a;
double r3434430 = 1.0;
double r3434431 = /* ERROR: no posit support in C */;
double r3434432 = 3.0;
double r3434433 = /* ERROR: no posit support in C */;
double r3434434 = r3434431 / r3434433;
double r3434435 = r3434429 - r3434434;
double r3434436 = r3434428 * r3434435;
double r3434437 = rand;
double r3434438 = r3434428 * r3434437;
double r3434439 = r3434438 * r3434435;
double r3434440 = 9.0;
double r3434441 = /* ERROR: no posit support in C */;
double r3434442 = r3434441 * r3434435;
double r3434443 = sqrt(r3434442);
double r3434444 = r3434439 / r3434443;
double r3434445 = /*Error: no posit support in C */;
double r3434446 = /*Error: no posit support in C */;
double r3434447 = r3434436 + r3434446;
return r3434447;
}



Bits error versus a



Bits error versus rand
Initial program 0.2
rmApplied distribute-rgt-in0.2
rmApplied sub-neg0.2
Applied distribute-rgt-in0.2
rmApplied introduce-quire0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019164 +o rules:numerics
(FPCore (a rand)
:name "Octave 3.8, oct_fill_randg"
(*.p16 (-.p16 a (/.p16 (real->posit16 1.0) (real->posit16 3.0))) (+.p16 (real->posit16 1) (*.p16 (/.p16 (real->posit16 1) (sqrt.p16 (*.p16 (real->posit16 9) (-.p16 a (/.p16 (real->posit16 1.0) (real->posit16 3.0)))))) rand))))