[DirectX] frexp() disregards sign

Open Beginner friendly
#9,155 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
compilers

Research direction

Start with the linked Godbolt example and reproduce the frexp() result for a negative float. Then locate the DirectX Shader Compiler implementation and tests for frexp(); the issue does not name specific files. Done when negative inputs return a mantissa with the input's sign, including the example's expected -0.5.

Written by the indexing model from the issue text.

Description

bug needs-triage

frexp() always returns a positive mantissa, even for negative input. In this example, the first float argument at output line 7 should be -0.5 rather than 0.5.

Dominant language
C++
Stars
3.7k
Forks
918
Avg merge
3d 12h
Merged PRs (30d)
41

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/DirectXShaderCompiler

All issues in microsoft/DirectXShaderCompiler

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.