Skip to content
New issue

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

NumberTextBox 精度问题 #1544

Open
shenlinjie opened this issue Mar 22, 2024 · 0 comments
Open

NumberTextBox 精度问题 #1544

shenlinjie opened this issue Mar 22, 2024 · 0 comments

Comments

@shenlinjie
Copy link

Describe the bug

NumberTextBox 控件,设置Increment=0.1d,DecimalPlaces=2, 点击增加箭头,逐个增加数值。无法显示2.30,显示的是2.29;

Steps to reproduce the bug

调试中发现:
Math.Truncate(230d)/100
2.3
Math.Truncate(Math.Pow(10,2)*2.3)/Math.Pow(10,2)
2.29
Math.Truncate(230d)/100d
2.3

Expected behavior

No response

Screenshots

No response

NuGet package version

None

IDE

No response

Framework type

No response

Windows version

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant