-
Notifications
You must be signed in to change notification settings - Fork 14
Discrepancy: number comparison differs from Processing Java (0.1 + 0.2 == 0.3) #203
Open
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(400, 400); if (0.1 + 0.2 == 0.3) { background(0, 255, 0); circle(200, 200, 100); } }
The equivalent mewnala sketch evaluates the condition as false.
from mewnala import * def setup(): size(200, 200) if 0.1 + 0.2 == 0.3: background(0, 255, 0) circle(200, 200, 100) run()
Note: size is reduced in mewnala to account for #198
ImageActivity
Metadata
Metadata
Assignees
Labels
No labels