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: 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:961c4019-56d6-6691-bf39-09a5f29307ba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E200:32C802:B88258:109E13C:6A5F7E78 |
| html-safe-nonce | 0ad976a29643bef9f3a6a01e3bb524b9b6920c31564a9d58b277d0f026963fe8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjAwOjMyQzgwMjpCODgyNTg6MTA5RTEzQzo2QTVGN0U3OCIsInZpc2l0b3JfaWQiOiIyNTI0MDIwNDIxODUyODg4Njk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 37ee1649539983042ced03b3dd3e9726c0439ee3b476e438b8a032aa81268e81 |
| 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 | af0b892181d17ddf6fdffe74cdc67c01f4e6205e116d7b6df0e4b3e129ff9948 |
| 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 | 0c55a5e833618f561722501a1bcba5c79dd95825 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width