Chris, in your view what are the correct results? and what's your reference?
result
Code: (Select All)
$Console:Only
_Dest _Console
Option _Explicit
Declare Library
Function fmod# (ByVal x As Double, Byval y As Double)
Function remainder# (ByVal x As Double, Byval y As Double)
Function remquo# (ByVal x As Double, Byval y As Double, quo As Long)
End Declare
Dim As Long quo
Print fmod(-1#, 5#)
Print fmod(-1.4#, 5#)
Print fmod(1.4#, 5#)
Print fmod(-7.0#, 5#)
Print fmod(-7.1#, 5#)
Print remquo(-1#, 5#, quo), quo
Print remquo(-1.4#, 5#, quo), quo
Print remquo(1.4#, 5#, quo), quo
Print remquo(-7.0#, 5#, quo), quo
Print remquo(-7.1#, 5#, quo), quo
result
Code: (Select All)
-1
-1.4
1.4
-2
-2.1
-1 0
-1.4 0
1.4 0
-2 -1
-2.1 -1