# rem和mod的區別

λ posted @ 2011年12月06日 18:27 in Mixture with tags lisp tutorial , 6158 阅读

# 細說rem＆mod（remainder＆modulo）

a ÷ b ＝ q … r

r ＝ a - q × b

## rem：使商向「內」取整

7 ÷ 3 ≈ 2.3

7 rem 3 ＝ 2 … 1

7 rem -3 ＝ -2 … 1

-7 rem 3 ＝ -2 … -1

-7 rem -3 ＝ 2 … -1

## mod：使商向「下」取整

7 ÷ 3 ≈ 2.3

7 mod 3 ＝ 2 … 1

7 mod -3 ＝ -3 … -2

-7 mod 3 ＝ -3 … 2

-7 mod -3 ＝ 2 … -1

OK，解說完畢。

## 其它資料

Creative Commons 保持署名-相同方式分享 2.5

Rrandom 说:
Dec 07, 2011 10:18:11 PM

racket里

> (remainder 1 3)
1
> (modulo 1 -3)
-2
> (remainder 1 -3)
1

remainder叫做取余.modulo叫做取模...

λ 说:
Dec 07, 2011 11:12:21 PM

-_-;感覺都一個意思，「模」好像是mo的擬聲。Racket竟然會用這麼完整的名稱啊……嗯，從結果看來，是同一標準的。

HDFC CIBIL score 说:
Aug 06, 2022 10:42:58 PM

Before we show you how you can check CIBIL score, first know that TransUnion CIBIL is an organization and an entity gathers all the consumer’s loan, credit, payment and money related transaction, and this gives a general behavior example and statics allowing to generate a score for each customer also calls as CIBIL score. In simple words, every individual based on their payment choices, credit decisions and money pertains may rank and given CIBIL score points which range up to 900 points. In the sense, if the customer receives anything above 750 – 900, <a href="https://25penny.com/cibil-score-login-check-report-free-paid/">HDFC CIBIL score</a> then they have high credit affinity. With this the banks and loan facilities may happy to lend credit to them. But in case if the CIBIL score for you is anywhere less than 750 or even worse then there are high chances that you will reject any loans, EMI, or credit requests. Because loan facilities and banks would consider your CIBIL Score as a baseline for approving those requests.

NCERT Sanskrit Sampl 说:
Sep 19, 2022 01:24:53 AM

The Sanskrit Language is one of the important languages and those 2nd Standard students of English Medium, Hindi Medium and Urdu Medium crossed it as their Second or Third Language. The Sanskrit language helps students to about the Indian culture and history of our country etc. So students who chose the Sanskrit language as their optional language can download NCERT Sanskrit Sample Paper 2023 Class 2. NCERT Sanskrit Sample Paper Class 2 Learning the Sanskrit language should begin from the foundation of Education to enable students to understand the language without any difficulties. To know the examination question pattern and scheme of the exam everyone can download NCERT Sanskrit Sample Paper 2023 Class 2 for all formats of exams conducted in Term 1, and Term 2.

(输入验证码)
or Ctrl+Enter

250236