554 |
@end deffn |
@end deffn |
555 |
|
|
556 |
@c begin (texi-doc-string "guile" "quotient") |
@c begin (texi-doc-string "guile" "quotient") |
|
@deffn {Scheme Procedure} quotient |
|
|
Return the quotient of the numbers @var{x} and @var{y}. |
|
|
@end deffn |
|
|
|
|
557 |
@c begin (texi-doc-string "guile" "remainder") |
@c begin (texi-doc-string "guile" "remainder") |
558 |
@deffn {Scheme Procedure} remainder |
@deffn {Scheme Procedure} quotient n d |
559 |
Return the remainder of the numbers @var{x} and @var{y}. |
@deffnx {Scheme Procedure} remainder n d |
560 |
|
Return the quotient or remainder from @var{n} divided by @var{d}. The |
561 |
|
quotient is rounded towards zero, and the remainder will have the same |
562 |
|
sign as @var{n}. In all cases quotient and remainder satisfy |
563 |
|
@math{@var{n} = @var{q}*@var{d} + @var{r}}. |
564 |
|
|
565 |
@lisp |
@lisp |
566 |
(remainder 13 4) @result{} 1 |
(remainder 13 4) @result{} 1 |
567 |
(remainder -13 4) @result{} -1 |
(remainder -13 4) @result{} -1 |
569 |
@end deffn |
@end deffn |
570 |
|
|
571 |
@c begin (texi-doc-string "guile" "modulo") |
@c begin (texi-doc-string "guile" "modulo") |
572 |
@deffn {Scheme Procedure} modulo |
@deffn {Scheme Procedure} modulo n d |
573 |
Return the modulo of the numbers @var{x} and @var{y}. |
Return the remainder from @var{n} divided by @var{d}, with the same |
574 |
|
sign as @var{d}. |
575 |
|
|
576 |
@lisp |
@lisp |
577 |
(modulo 13 4) @result{} 1 |
(modulo 13 4) @result{} 1 |
578 |
(modulo -13 4) @result{} 3 |
(modulo -13 4) @result{} 3 |
579 |
|
(modulo 13 -4) @result{} -3 |
580 |
|
(modulo -13 -4) @result{} -1 |
581 |
@end lisp |
@end lisp |
582 |
@end deffn |
@end deffn |
583 |
|
|