langleyfoxall / langleyfoxall/math_eval
Problem with simple calcul
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 42
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have a problem with a simple calcul :
math_eval("0.37+0.31-0.68"), the result is "0" but the math_eval function return "-1.1102230246252E-16"
Have you an idea of the problem ?
Thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the math_eval implementation and reproduce the expression 0.37+0.31-0.68 to confirm the returned value. Determine the expected precision behavior for this calculation and add or update a focused regression test showing the desired result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100