We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String interpolation of float precision should consist to it's C version.
A format.v
module main fn main() { x := 1.234 println('[${x:1.15g}]') }
This will give a result of :
[1.234000000000000]
But a C version format.c
#include <stdio.h> void main() { double a = 1.234; printf("[%1.15g]\n",a); }
will generate result:
[1.234]
V version will generate same result to it's C version:
No response
V full version: V 0.4.8 7b8e059.0390c07
V full version: V 0.4.8 7b8e059.0390c07 OS: linux, Ubuntu 24.04.1 LTS Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
getwd: /home/mars/v/format vexe: /media/HD/github/kbkpbot/v/v vexe mtime: 2024-10-04 14:33:40
vroot: OK, value: /media/HD/github/kbkpbot/v VMODULES: OK, value: /home/mars/.vmodules VTMP: OK, value: /tmp/v_1000
Git version: git version 2.43.0 Git vroot status: 0.4.8-41-g99f42812 .git/config present: true
CC version: cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered:
491d6f4
No branches or pull requests
Describe the bug
String interpolation of float precision should consist to it's C version.
Reproduction Steps
A format.v
This will give a result of :
But a C version format.c
will generate result:
Expected Behavior
V version will generate same result to it's C version:
Current Behavior
Possible Solution
No response
Additional Information/Context
No response
V version
V full version: V 0.4.8 7b8e059.0390c07
Environment details (OS name and version, etc.)
V full version: V 0.4.8 7b8e059.0390c07
OS: linux, Ubuntu 24.04.1 LTS
Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz
getwd: /home/mars/v/format
vexe: /media/HD/github/kbkpbot/v/v
vexe mtime: 2024-10-04 14:33:40
vroot: OK, value: /media/HD/github/kbkpbot/v
VMODULES: OK, value: /home/mars/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.43.0
Git vroot status: 0.4.8-41-g99f42812
.git/config present: true
CC version: cc (Ubuntu 13.2.0-23ubuntu4) 13.2.0
thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: