diff src/data.cc @ 11357:903c1a3df301

Add additional tests for mod with non-integer real values.
author Rik <octave@nomad.inbox5.com>
date Mon, 13 Dec 2010 20:39:37 -0800
parents 0090bb47d0b5
children a9a3ee461b83
line wrap: on
line diff
--- a/src/data.cc
+++ b/src/data.cc
@@ -772,6 +772,10 @@
 %!assert (mod(uint8(5),4),uint8(1))
 %!assert (mod(5,uint8(4)),uint8(1))
 %!assert (mod(uint8([1:5]),4),uint8([1,2,3,0,1]))
+
+## non-integer real numbers
+%!assert (mod (2.1, 0.1), 0)
+%!assert (mod (2.1, 0.2), 0.1, eps)
 */
 
 // FIXME Need to convert the reduction functions of this file for single precision