Skip to content

Commit

Permalink
Merge pull request #184 from PESchoenberg/develop
Browse files Browse the repository at this point in the history
New functions.
  • Loading branch information
PESchoenberg authored Mar 19, 2022
2 parents 7926526 + cdc2b35 commit 7037003
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 52 deletions.
9 changes: 8 additions & 1 deletion grsp0.scm
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@
(newlines 100))


;;;; pres - Display results.
;;;; pres - Display results with areference string or title and an equal sign
;; preceeding the results string.
;;
;; Keywords:
;; - console, strings.
Expand All @@ -162,6 +163,9 @@
;; - p_s1: reference, string.
;; - p_s2: result, string.
;;
;; Notes:
;; - See pres2.
;;
(define (pres p_s1 p_s2)
(let ((res1 " "))

Expand All @@ -179,6 +183,9 @@
;; - p_s1: reference, string.
;; - p_s2: result.
;;
;; Notes:
;; - See pres.
;;
(define (pres2 p_s1 p_s2)
(newline)
(display p_s1)
Expand Down
14 changes: 10 additions & 4 deletions grsp2.scm
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,15 @@
(b1 #f)
(i1 2))

;; Cycle.
(while (eq? b1 #f)
(cond ((= 0 (remainder p_n1 i1))
(set! res1 #f)
(set! b1 #t)))
(set! i1 (+ i1 1))
(cond ((>= i1 p_n1)
(set! b1 #t))))

(cond ((grsp-getles p_n1 -1 1)
(set! res1 #f)))

Expand Down Expand Up @@ -886,6 +888,7 @@
(set! res1 (+ (/ (expt p_k1 p_n1)
(grsp-fact p_k1))))
(set! i1 (+ i1 1)))))))

(set! res1 (* res1 (/ 1 (grsp-e))))

res1))
Expand Down Expand Up @@ -962,8 +965,8 @@
(let ((res1 0))

(set! res1 (+ p_y1 (* (- p_x3 p_x1)
(/ (- p_y2 p_y1)
(- p_x2 p_x1)))))
(/ (- p_y2 p_y1)
(- p_x2 p_x1)))))

res1))

Expand Down Expand Up @@ -1020,6 +1023,8 @@
(set! v4 (/ 1 v7))
(set! v3 (* v4 v6))
(set! v5 (* v2 v7))))

;; Compose results.
(set! res1 (list v3 v4 v5))

res1))
Expand Down Expand Up @@ -1715,7 +1720,7 @@
;; - [30].
;;
(define (grsp-intifint p_b1 p_z1 p_z2)
(let ((res1 p_z2) ; 0
(let ((res1 p_z2)
(z1 p_z1))

(cond ((equal? p_b1 #t)
Expand Down Expand Up @@ -1809,7 +1814,8 @@
(set! n2 (+ n2 1)))
((equal? s1 "#tr")
(set! n3 (+ n2 1))))))


;; Compose results.
(set! res1 (list n2 n3))

res1))
Expand Down
Loading

0 comments on commit 7037003

Please sign in to comment.