-
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
proposalpending discussion about something to dopending discussion about something to dospecificationinvolves the nyan language specificationinvolves the nyan language specification
Description
nyan needs a built-in fixed-point type to handle safe arithmetics for fractional numbers. The implementation can be taken from the openage fixed-point implementation.
The type identifier could be fixed, fpdouble or doublefp. It can probably be hardcoded as a <int64_t, 16> fixed point (64 Bit signed, 16 Bit scale factor) which should be sufficient for most use cases.
ExampleObj():
member : fixed = 1.25
The type could be compatible with the int type, and maybe with float if float is the left operand.
fixedofixed=>fixedfixedoint=>fixedfixedofloat=> ERROR
Metadata
Metadata
Assignees
Labels
proposalpending discussion about something to dopending discussion about something to dospecificationinvolves the nyan language specificationinvolves the nyan language specification