Help me!
I have this number 1726.16723958045672098127.
How Can I register in my db MySql.
Why is the number truncated?
riccardo.farabi 0 Newbie Poster
Recommended Answers
Jump to PostFinance? As in money? Then use Integer or Fixed Point types. No one in finance would select a floating point until it's about statistics.
Jump to PostIn finance, or anywhere where precision is important, you use fixed point numbers (integer math), not floating point.
In finance moreover, typically (and this is an internationally recognised standard employed by banks) only the first 5 digits are considered significant.
Anything over that is irrelevant.
Jump to PostThis IS why we must understand computer number formats and along that the limitations. As RJ and jwenting specifically pointed out that banks and such consider so many digits.
You wrote "So is it unsolved in php?" but did you:
- Implement BIGNUM.
- Scale your numbers.
Maybe you don't …
Jump to PostI have this number 1726.16723958045672098127.
How Can I register in my db MySql.
Why is the number truncated?should be a column type decimal, DECIMAL(24,20) would store the number you just mentioned without truncating.
24 - how many digits in the number
20 - how many digits are …
Jump to PostI'm not sure, but maybe this could help you?
All 21 Replies
rproffitt 2,701 https://5calls.org Moderator
riccardo.farabi 0 Newbie Poster
rproffitt 2,701 https://5calls.org Moderator
riccardo.farabi 0 Newbie Poster
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
rproffitt 2,701 https://5calls.org Moderator
riccardo.farabi 0 Newbie Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
jwenting 1,905 duckman Team Colleague
riccardo.farabi 0 Newbie Poster
Reverend Jim 5,225 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster
rproffitt 2,701 https://5calls.org Moderator
Biiim 182 Junior Poster
riccardo.farabi 0 Newbie Poster
rproffitt 2,701 https://5calls.org Moderator
pritaeas commented: Two thumbs up! +17
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member
Biiim 182 Junior Poster
riccardo.farabi 0 Newbie Poster
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
rproffitt commented: XY! 👍 Up! +16
riccardo.farabi 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.