Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-11630

Compiler incorrectly computes pow(10, -320) to be 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Not Prioritized Not Prioritized

      The attached test case has these lines ...

          double a, b;
      
          /* .. */
      
          a = pow(10, -320);
          b = pow(10, -20);
      
      /* ... */
      
          printf("a is %e\n", a);
          printf("b is %e\n", b);
      

      When run, the output is ...

      a is 0.000000e+00
      b is 1.000000e-20
      

      The expected output is ...

      a is 1.000000e-320
      b is 1.000000e-20
      

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: