LeiWang1999 opened a new pull request, #18320:
URL: https://github.com/apache/tvm/pull/18320

   Previously, `float` constants in codegen were always emitted in **scientific 
decimal format**, e.g.:
   
   ```cpp
   bfloat16_t(3.487723e-05f);
   ```
   
   This could introduce slight **rounding differences** compared to the actual 
binary representation, since the constant is printed and then re-parsed in 
decimal. we now emit the value in **hexadecimal floating-point format** 
(`std::hexfloat`) to preserve the exact binary value, and additionally include 
the decimal form as a comment for readability:
   
   ```cpp
   bfloat16_t(0x1.2492492492492p-15f /*3.487723e-05*/)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to