;; The first three lines of this file were inserted by DrScheme. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 7.7.1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
; Exercise 7.7.1

(define bignum 1234567890)
; cube : number -> number
(check-expect (cube 0) 0)
(check-expect (cube 2) 8)
(check-expect (cube -3) -27)
(check-within (cube (sqrt 2)) 2.828 .01)

(define (cube num)
  ; num number 2/3
  ; should be number 8/27
  (* num num num)
  )

; Note that "should be"-style test cases must come AFTER the definition.
(cube 19) "should be a little under 8000"
(cube bignum) "should be 28-29 digits long"
; "check-expect"-style test cases can go either before or after the definition.
(check-expect (cube 2/3) 8/27)