runtime icon indicating copy to clipboard operation
runtime copied to clipboard

ARM/ARM64 returns an incorrect result for `pow(x, 1)`

Open tannergooding opened this issue 7 years ago • 8 comments

ARM/ARM64 currently return 0 for Math.Pow(double.Epsilon, 1) when it should be returning double.Epsilon. My best guess is that the implementation is not properly special casing y=1.

category:correctness theme:jit-intrinsics skill-level:beginner cost:small

tannergooding avatar Feb 27 '19 20:02 tannergooding

CC. @AndyAyersMS logged this to track the underlying issue for https://github.com/dotnet/coreclr/pull/22802

tannergooding avatar Feb 27 '19 20:02 tannergooding

There are other various cross-platform differences for the various Math functions so I am putting this into future.

tannergooding avatar Feb 27 '19 20:02 tannergooding

Un-assigning myself cc @BruceForstall

echesakov avatar Mar 15 '22 21:03 echesakov

@tannergooding can you update the status of this issue?

AndyAyersMS avatar Apr 28 '22 18:04 AndyAyersMS

Tagging subscribers to this area: @dotnet/area-system-numerics See info in area-owners.md if you want to be subscribed.

Issue Details

ARM/ARM64 currently return 0 for Math.Pow(double.Epsilon, 1) when it should be returning double.Epsilon. My best guess is that the implementation is not properly special casing y=1.

category:correctness theme:jit-intrinsics skill-level:beginner cost:small

Author: tannergooding
Assignees: -
Labels:

bug, arch-arm32, arch-arm64, area-System.Numerics, Priority:3

Milestone: 7.0.0

ghost avatar Apr 28 '22 19:04 ghost

Issue is still present and should be eventually resolved. This isn't really a codegen issue, but rather an implementation issue with the underlying CRT implementation we defer to, so I've changed the area path.

tannergooding avatar Apr 28 '22 19:04 tannergooding

This is a "fix anytime" issue. It may eventually get picked up alongside other determinism changes that happen

tannergooding avatar Aug 14 '23 18:08 tannergooding

@tannergooding Can i take a look at this

Venkad000 avatar Jun 26 '26 12:06 Venkad000