add basic trig functions to floats

This commit is contained in:
Rowan Torbitzky-Lane 2025-01-19 21:12:50 -06:00
parent 5c8fd8fbd9
commit 23eddb756d

View File

@ -86,3 +86,15 @@ instructionFloatShoveDup state = instructionShoveDup state float
instructionFloatShove :: State -> State instructionFloatShove :: State -> State
instructionFloatShove state = instructionShove state float instructionFloatShove state = instructionShove state float
instructionFloatSin :: State -> State
instructionFloatSin state@(State {_float = f1 : fs}) = state {_float = sin f1 : fs}
instructionFloatSin state = state
instructionFloatCos :: State -> State
instructionFloatCos state@(State {_float = f1 : fs}) = state {_float = cos f1 : fs}
instructionFloatCos state = state
instructionFloatTan :: State -> State
instructionFloatTan state@(State {_float = f1 : fs}) = state {_float = tan f1 : fs}
instructionFloatTan state = state