Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Command: tr -c '[0-9]' ' ' </tmp/input | dc -e'?0' -fdc-p12.dc
- # Replace the ?0' with '?10000000000000' for part 2.
- so # Store offset in o
- # Score: div -> junk
- [
- d # div div
- lar/ 3* # 3*a/div div
- r lbr/+ # b/div+3*a/div
- ls+ss
- 0
- ] sS
- [
- # stack frame: (Ty Tx by bx ay ax)
- lo+sy lo+sx # store Ty Tx
- d lx* # Tx*by by bx ay ax
- 3Rd ly* # Ty*bx by Tx*by bx ay ax
- 3Rr- sa # a = Tx*by-Ty*bx; stack: bx by ay ax
- 3Rd lx* # Tx*ay ay bx by ax
- 5Rd ly* # Ty*ax ax Tx*ay ay bx by
- 3R- sb # b = Ty*ax-Tx*ay; stack: ax ay bx by
- 4R*_3R*- # div=ax*by-ay*bx
- dd # div div div
- lar% # a%div div div
- r lbr% + # b%div+a%div div
- 0=S s.
- z0<M
- ] dsMx
- lsp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement