Groups
Groups
Sign in
Groups
Groups
SICP 함께 공부하기
Conversations
About
Send feedback
Help
연습문제 1.17과 1.18에서의 부호 처리
4 views
Skip to first unread message
comkid
unread,
Mar 12, 2008, 10:50:50 AM
3/12/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SICP 함께 공부하기
아무래도 곱셈이니까 문제에 언급되지는 않았어도 음수와 양수, 양수와 음수, 음수와 음수, 양수와 양수 인 쌍을 모두 확인해 봐야
할 것 같습니다.
1.18까지 푸신 분들 보니까 부호 처리는 다 안하신 것 같아서 쓰레드 열어 봅니다.
제가 테스트 해 본 입력 쌍은
; Test
(= (fast-* 2 10) (* 2 10))
(= (fast-* 17 13) (* 17 13))
(= (fast-* 0 5) (* 0 5))
(= (fast-* 5 0) (* 5 0))
(= (fast-* -3 -2) (* -3 -2))
(= (fast-* -3 100) (* -3 100))
(= (fast-* 3 -100) (* 3 -100))
입니다~
deisys
unread,
Mar 12, 2008, 9:08:53 PM
3/12/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SICP 함께 공부하기
오, 그 생각을 못했네요.
후다닥 가서 해보니 두번째 인자가 음수인 경우에 동작을 안하더라구요.
날카로운 눈매! ~>_<~
Jin
unread,
Mar 12, 2008, 11:25:56 PM
3/12/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SICP 함께 공부하기
제 경우도 기존 구현은 두번째 인자가 음수일 때 무한 반복에 빠지는군요.
음수의 경우도 제대로 처리할 수 있도록 수정해봤습니다. 반복 프로시저를 약간 수정하니 잘 되더군요.
On 3월12일, 오후11시50분, comkid <
icom...@gmail.com
> wrote:
Reply all
Reply to author
Forward
0 new messages