[GH-ISSUE #218] Python division not exact #84

Closed
opened 2026-05-06 13:15:15 +02:00 by BreizhHardware · 2 comments

Originally created by @Golem642 on GitHub (May 5, 2022).
Original GitHub issue: https://github.com/UpsilonNumworks/Upsilon/issues/218

Describe the bug
Sometimes when dividing a number in Python that gives an integer result, it display it followed by a lot of zeros and a 1

To Reproduce
Steps to reproduce the behavior:

  1. Go to Python
  2. Click on Console
  3. Execute 132/2

Expected behavior
The divided number should have a lot of zeros followed by a 1 at the end, this only apply to some divisions. Another working example is 51/1

Device

  • Numworks n110
  • Upsilon Version: 1.0.0-dev
  • Upsilon commit: public
Originally created by @Golem642 on GitHub (May 5, 2022). Original GitHub issue: https://github.com/UpsilonNumworks/Upsilon/issues/218 **Describe the bug** Sometimes when dividing a number in Python that gives an integer result, it display it followed by a lot of zeros and a 1 **To Reproduce** Steps to reproduce the behavior: 1. Go to Python 2. Click on Console 3. Execute `132/2` **Expected behavior** The divided number should have a lot of zeros followed by a 1 at the end, this only apply to some divisions. Another working example is `51/1` **Device** - Numworks n110 - Upsilon Version: 1.0.0-dev - Upsilon commit: public
BreizhHardware 2026-05-06 13:15:15 +02:00
Author
Owner

@Yaya-Cout commented on GitHub (May 5, 2022):

I think it's a precision bug.

<!-- gh-comment-id:1118751030 --> @Yaya-Cout commented on GitHub (May 5, 2022): I think it's a precision bug.
Author
Owner

@Lauryy06 commented on GitHub (May 5, 2022):

Yes, it's the imprecision of floating point numbers, a problem that affects computers since the beginning of computing and that we can't fix.

<!-- gh-comment-id:1118784162 --> @Lauryy06 commented on GitHub (May 5, 2022): Yes, it's the imprecision of floating point numbers, a problem that affects computers since the beginning of computing and that we can't fix.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Upsilon#84
No description provided.