Average Error: 0.8 → 0.1
Time: 3.7s
Precision: binary64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10} \]
\[-\frac{\tan^{-1}_* \frac{im}{re}}{\log 0.1} \]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
-\frac{\tan^{-1}_* \frac{im}{re}}{\log 0.1}
(FPCore (re im) :precision binary64 (/ (atan2 im re) (log 10.0)))
(FPCore (re im) :precision binary64 (- (/ (atan2 im re) (log 0.1))))
double code(double re, double im) {
	return atan2(im, re) / log(10.0);
}
double code(double re, double im) {
	return -(atan2(im, re) / log(0.1));
}

Error

Bits error versus re

Bits error versus im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.8

    \[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10} \]
  2. Applied egg-rr0.1

    \[\leadsto \color{blue}{-\frac{\tan^{-1}_* \frac{im}{re}}{\log 0.1}} \]
  3. Final simplification0.1

    \[\leadsto -\frac{\tan^{-1}_* \frac{im}{re}}{\log 0.1} \]

Reproduce

herbie shell --seed 2022130 
(FPCore (re im)
  :name "math.log10 on complex, imaginary part"
  :precision binary64
  (/ (atan2 im re) (log 10.0)))