Opened 20 years ago
Last modified 19 years ago
#9 closed defect (fixed)
Inbyggda funktionen rem(...) funkar ej
Reported by: | levsa | Owned by: | levsa |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | levsa, Adrian Pop |
Description
Note:
See TracTickets
for help on using tickets.
Den inbyggda funktionen rem(...) verkar returnera 0 eller 0.0 oavsett vilka
argument som ges. (testexempel, se Peter Fritzsons bok, sid 200)
Returns the integer remainder of x/y, such that div(x,y) * y + rem(x,y) = x.
Result and arguments shall have type Real or Integer. If either of the arguments
have type Real, the result is a Real, otherwise an Integer. Events can be triggered.
Examples: rem(10,2)=0, rem(11,2)=1, rem(2,0.8) = 0.4, rem(2,-0.8) = -0.4.
Däremot verkar mod och div fungera bra.