Title: Discrepancy: number comparison differs from Processing Java `(0.1 + 0.2 == 0.3)` · Issue #203 · processing/libprocessing · GitHub
Open Graph Title: Discrepancy: number comparison differs from Processing Java `(0.1 + 0.2 == 0.3)` · Issue #203 · processing/libprocessing
X Title: Discrepancy: number comparison differs from Processing Java `(0.1 + 0.2 == 0.3)` · Issue #203 · processing/libprocessing
Description: I don't know whether this is something that needs to be addressed or just documented. I suppose this is related to the difference between float and double precision (?) In Processing, this condition evaluates to true: void setup() { size...
Open Graph Description: I don't know whether this is something that needs to be addressed or just documented. I suppose this is related to the difference between float and double precision (?) In Processing, this conditio...
X Description: I don't know whether this is something that needs to be addressed or just documented. I suppose this is related to the difference between float and double precision (?) In Processing, this cond...
Opengraph URL: https://github.com/processing/libprocessing/issues/203
X: @github
Domain: atooq@github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Discrepancy: number comparison differs from Processing Java `(0.1 + 0.2 == 0.3)`","articleBody":"I don't know whether this is something that needs to be addressed or just documented. \nI suppose this is related to the difference between `float` and `double` precision (?)\n\nIn Processing, this condition evaluates to `true`:\n\n```java\nvoid setup() {\n size(400, 400);\n\n if (0.1 + 0.2 == 0.3) {\n background(0, 255, 0);\n circle(200, 200, 100);\n }\n}\n```\n\nThe equivalent mewnala sketch evaluates the condition as `false`.\n\n```python\nfrom mewnala import *\n\ndef setup():\n size(200, 200)\n\n if 0.1 + 0.2 == 0.3:\n background(0, 255, 0)\n circle(200, 200, 100)\n\nrun()\n```\n\n_Note: size is reduced in mewnala to account for https://github.com/processing/libprocessing/issues/198_\n\n\u003cimg width=\"1315\" height=\"702\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1a21ed52-82bc-4e2e-9b31-b00c69d8cc47\" /\u003e","author":{"url":"https://github.com/SableRaf","@type":"Person","name":"SableRaf"},"datePublished":"2026-07-14T11:41:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/203/libprocessing/issues/203"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a3777b53-5d58-7790-1811-2f629cf22beb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FD8:2AE2E2:5468FC5:6E044F9:6A5D8531 |
| html-safe-nonce | 03711b3d33bd92e49accb04d36f705b0470767f2401bd037fcce8b7ddc8aef5e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkQ4OjJBRTJFMjo1NDY4RkM1OjZFMDQ0Rjk6NkE1RDg1MzEiLCJ2aXNpdG9yX2lkIjoiMjE0NTk2NDg4OTIxOTEwNjA5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0056126df7a95aab291d4b8de4ef10abdfbd60d39cc734353ebe0e01d417f2a7 |
| hovercard-subject-tag | issue:4882687777 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/processing/libprocessing/203/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7fc3d5d652a5d6c766e65a58a349317dd55ca621441270e6e5f59fab42574e37/processing/libprocessing/issues/203 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7fc3d5d652a5d6c766e65a58a349317dd55ca621441270e6e5f59fab42574e37/processing/libprocessing/issues/203 |
| og:image:alt | I don't know whether this is something that needs to be addressed or just documented. I suppose this is related to the difference between float and double precision (?) In Processing, this conditio... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SableRaf |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/processing/libprocessing git https://github.com/processing/libprocessing.git |
| octolytics-dimension-user_id | 1617169 |
| octolytics-dimension-user_login | processing |
| octolytics-dimension-repository_id | 1101329545 |
| octolytics-dimension-repository_nwo | processing/libprocessing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1101329545 |
| octolytics-dimension-repository_network_root_nwo | processing/libprocessing |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width