Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8285384

Math.exp(1.0) has different result on aarch64 vs x86

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 17
    • core-libs
    • None

      On aarch64, `Math.exp(1.0)` returns a value that has an extra decimal place compared with the result on x86:

      #### `linux-aarch64`
      ```
      $ jshell
      | Welcome to JShell -- Version 17.0.3
      | For an introduction type: /help intro

      jshell> Math.exp(1.0)
      $1 ==> 2.7182818284590455
      jshell> Math.exp(1.0) == 2.718281828459045D
      $2 ==> false
      ```

      #### `linux-x64`
      ```
      $ jshell
      | Welcome to JShell -- Version 17.0.3
      | For an introduction type: /help intro

      jshell> Math.exp(1.0)
      $1 ==> 2.718281828459045
      jshell> Math.exp(1.0) == 2.718281828459045D
      $2 ==> true
      ```

      Filed on behalf of [~fniephaus].

            darcy Joe Darcy
            dnsimon Douglas Simon
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: