Title: wrong modulo computation for negative doubles or floats · Issue #58 · kframework/java-semantics · GitHub
Open Graph Title: wrong modulo computation for negative doubles or floats · Issue #58 · kframework/java-semantics
X Title: wrong modulo computation for negative doubles or floats · Issue #58 · kframework/java-semantics
Description: There seems to be an issue with the modulo operator. The computation is wrong for all negative doubles and floats, i.e. it produces inconsistent values compared to Java and also compared to the same computation with Integer values. This ...
Open Graph Description: There seems to be an issue with the modulo operator. The computation is wrong for all negative doubles and floats, i.e. it produces inconsistent values compared to Java and also compared to the sam...
X Description: There seems to be an issue with the modulo operator. The computation is wrong for all negative doubles and floats, i.e. it produces inconsistent values compared to Java and also compared to the sam...
Opengraph URL: https://github.com/kframework/java-semantics/issues/58
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"wrong modulo computation for negative doubles or floats","articleBody":"There seems to be an issue with the modulo operator. The computation is wrong for all negative doubles and floats, i.e. it produces inconsistent values compared to Java and also compared to the same computation with Integer values. This is illustrated in the following examples. \r\n```\r\nSystem.out.println(\"-8 % 3 = \"+(-8 % 3)); //both kjava and java return -2\r\nSystem.out.println(\"-8.0 % 3.0 = \"+(-8.0 % 3)); //kjava: 1.0 java: -2.0\r\nSystem.out.println(\"8 % -3 = \"+(8 % -3 )); // both return 2\r\nSystem.out.println(\"8.0 % -3.0 = \"+(8.0 % -3.0)); //kjava: -4.0 java: 2.0\r\n```","author":{"url":"https://github.com/rschumi0","@type":"Person","name":"rschumi0"},"datePublished":"2020-02-29T23:21:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/58/java-semantics/issues/58"}
| 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:17531e1a-e7ba-5685-8b32-b96564f89cf9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDD6:3C3D86:2A4177:377D42:69719176 |
| html-safe-nonce | 6fca004142ce5403817a3d9fae622b0d55bf747f0aa25a808bf0a2f6cc8c9e64 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREQ2OjNDM0Q4NjoyQTQxNzc6Mzc3RDQyOjY5NzE5MTc2IiwidmlzaXRvcl9pZCI6IjY3NDM0MDg2NzU4MTg0MTAzNTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ec693c82c6478a9753ade835c27ebacee66f566abd3a3f89bc1ac46d67d86020 |
| hovercard-subject-tag | issue:573429414 |
| 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/kframework/java-semantics/58/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dab1e7315530ed92af2d6993973eac7be0ff2e303a6bc55b1f6ac1cca419ac8a/kframework/java-semantics/issues/58 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dab1e7315530ed92af2d6993973eac7be0ff2e303a6bc55b1f6ac1cca419ac8a/kframework/java-semantics/issues/58 |
| og:image:alt | There seems to be an issue with the modulo operator. The computation is wrong for all negative doubles and floats, i.e. it produces inconsistent values compared to Java and also compared to the sam... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rschumi0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2b0f2f00499ad3dd2c21ad030a3c403edca54df20ea256f6517c6d8c4fa3a1a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/kframework/java-semantics git https://github.com/kframework/java-semantics.git |
| octolytics-dimension-user_id | 5104335 |
| octolytics-dimension-user_login | kframework |
| octolytics-dimension-repository_id | 11711471 |
| octolytics-dimension-repository_nwo | kframework/java-semantics |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 11711471 |
| octolytics-dimension-repository_network_root_nwo | kframework/java-semantics |
| 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 | 67235153f3c1514ed5f7dc469f138abc377bd388 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width