bug 12449: QUANT_f quantization methods were not behaving properly. Clarified documen...
[scilab.git] / scilab / modules / scicos_blocks / src / fortran / qzrnd.f
index 3ce84a4..9e8290d 100644 (file)
@@ -34,13 +34,9 @@ c
 
 
       integer i
-c
+c     Quantization by rounding the number of quantized steps
       do 15 i=1,nu
-         if (u(i).lt.0.0d0)then
-            y(i)=rpar(i)*(ANINT(u(i)/rpar(i)+0.5d0)-0.5d0)
-         else
-            y(i)=rpar(i)*(ANINT(u(i)/rpar(i)-0.5d0)+0.5d0)
-         endif
+         y(i)=rpar(i)*ANINT(u(i)/rpar(i))
  15   continue
       return
       end