commit 082701161e451dc80a3f4eb7facad32f1cd0e5a9
parent 0b5f58496174b3033311558e8530bebeb1c74bb7
Author: Agastya Chandrakant <acagastya@outlook.com>
Date: Mon, 16 Apr 2018 22:34:54 +0530
Update report.md
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/s4/fafl/report.md b/s4/fafl/report.md
@@ -85,6 +85,8 @@ Since calculation of modulo is subtracion of `v` from `u` until `u` is strictly
- Make current cell as `1`.
- Goto right until current cell is `B`.
- Make `B` as `1`. Repeat these four sub-steps until instruction pointer reaches `B` on the right hand side.
+
+To find quotient, a small tweak should suffice. That is, "_Having travelled two right from reading `1`, if current cell is `X`, one subtraction is finished._" Make use of a different symbol in the array to distinguish second number from quotient (use another `i` -- personal choice, really does not matter). After making all `X` as `1`, go right until current cell is `B`. Make `B` as `1`. Move right, make current symbol as `B`. Go left until current cell is `0`. Goto step #2.
#### To find if the number is prime