The type f32 always prints 0.000000 when using the printf function provided by LLVM IR.
It works fine when casting to an f64, so the problem is likely due to the printf implementation of LLVM IR and it might not do type promotion correctly.
To Reproduce
Steps to reproduce the behavior:
Create a lotus program
Create the main function with a variable of type f32
Try to print the variable with printf and %f
Run the code and see that it only prints zeros
Expected behavior
The f32 type should work the same as the f64 when printing.
Screenshots
Environment (please complete the following information):
Describe the bug
The type f32 always prints 0.000000 when using the printf function provided by LLVM IR. It works fine when casting to an f64, so the problem is likely due to the printf implementation of LLVM IR and it might not do type promotion correctly.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The f32 type should work the same as the f64 when printing.
Screenshots
Environment (please complete the following information):