From 1a8c81d07efe55c5a6909aff32359d4b8866af1c Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Wed, 27 Sep 2023 09:53:37 -0600 Subject: keep unit tests but make directory structure more consistent with requirements i did not read --- .gitmodules | 3 +++ cl/lizfcm.asd | 39 --------------------------------------- cl/src/approx/derivative.lisp | 9 --------- cl/src/approx/maceps.lisp | 11 ----------- cl/src/approx/package.lisp | 5 ----- cl/src/package.lisp | 7 ------- cl/src/utils/package.lisp | 5 ----- cl/src/utils/table.lisp | 11 ----------- cl/src/utils/within-range.lisp | 5 ----- cl/src/vector/distance.lisp | 6 ------ cl/src/vector/norm.lisp | 17 ----------------- cl/src/vector/package.lisp | 7 ------- cl/tests/approx.lisp | 24 ------------------------ cl/tests/maceps.lisp | 27 --------------------------- cl/tests/suite.lisp | 10 ---------- cl/tests/table.lisp | 31 ------------------------------- cl/tests/vector.lisp | 31 ------------------------------- class | 1 + homeworks/hw-2.org | 2 +- lizfcm.asd | 39 +++++++++++++++++++++++++++++++++++++++ src/approx/derivative.lisp | 9 +++++++++ src/approx/maceps.lisp | 11 +++++++++++ src/approx/package.lisp | 5 +++++ src/package.lisp | 7 +++++++ src/utils/package.lisp | 5 +++++ src/utils/table.lisp | 11 +++++++++++ src/utils/within-range.lisp | 5 +++++ src/vector/distance.lisp | 6 ++++++ src/vector/norm.lisp | 17 +++++++++++++++++ src/vector/package.lisp | 7 +++++++ tests/approx.lisp | 24 ++++++++++++++++++++++++ tests/maceps.lisp | 27 +++++++++++++++++++++++++++ tests/suite.lisp | 10 ++++++++++ tests/table.lisp | 31 +++++++++++++++++++++++++++++++ tests/vector.lisp | 31 +++++++++++++++++++++++++++++++ 35 files changed, 250 insertions(+), 246 deletions(-) create mode 100644 .gitmodules delete mode 100644 cl/lizfcm.asd delete mode 100644 cl/src/approx/derivative.lisp delete mode 100644 cl/src/approx/maceps.lisp delete mode 100644 cl/src/approx/package.lisp delete mode 100644 cl/src/package.lisp delete mode 100644 cl/src/utils/package.lisp delete mode 100644 cl/src/utils/table.lisp delete mode 100644 cl/src/utils/within-range.lisp delete mode 100644 cl/src/vector/distance.lisp delete mode 100644 cl/src/vector/norm.lisp delete mode 100644 cl/src/vector/package.lisp delete mode 100644 cl/tests/approx.lisp delete mode 100644 cl/tests/maceps.lisp delete mode 100644 cl/tests/suite.lisp delete mode 100644 cl/tests/table.lisp delete mode 100644 cl/tests/vector.lisp create mode 160000 class create mode 100644 lizfcm.asd create mode 100644 src/approx/derivative.lisp create mode 100644 src/approx/maceps.lisp create mode 100644 src/approx/package.lisp create mode 100644 src/package.lisp create mode 100644 src/utils/package.lisp create mode 100644 src/utils/table.lisp create mode 100644 src/utils/within-range.lisp create mode 100644 src/vector/distance.lisp create mode 100644 src/vector/norm.lisp create mode 100644 src/vector/package.lisp create mode 100644 tests/approx.lisp create mode 100644 tests/maceps.lisp create mode 100644 tests/suite.lisp create mode 100644 tests/table.lisp create mode 100644 tests/vector.lisp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..8b4a671 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "math4610"] + path = class + url = https://github.com/jvkoebbe/math4610 diff --git a/cl/lizfcm.asd b/cl/lizfcm.asd deleted file mode 100644 index 3e8c289..0000000 --- a/cl/lizfcm.asd +++ /dev/null @@ -1,39 +0,0 @@ -(asdf:defsystem "lizfcm" - :version "0.1.0" - :author "Elizabeth Hunt" - :license "MIT" - :components ((:module "src" - :components - ((:module "utils" - :components - ((:file "within-range" :depends-on ("package")) - (:file "table" :depends-on ("package")) - (:file "package"))) - (:module "approx" - :components - ((:file "maceps" :depends-on ("package")) - (:file "derivative" :depends-on ("package")) - (:file "package"))) - (:module "vector" - :components - ((:file "distance" :depends-on ("norm" "package")) - (:file "norm" :depends-on ("package")) - (:file "package"))))))) - - -(asdf:defsystem "lizfcm/tests" - :author "Elizabeth Hunt" - :license "MIT" - :depends-on (:fiveam - :lizfcm) - :components ((:module "tests" - :components - ((:file "table" :depends-on ("suite")) - (:file "maceps" :depends-on ("suite")) - (:file "approx" :depends-on ("suite")) - (:file "vector" :depends-on ("suite")) - (:file "suite")))) - :perform (asdf:test-op (o c) (uiop:symbol-call - :fiveam :run! - (uiop:find-symbol* :lizfcm-test-suite :lizfcm/tests)))) - diff --git a/cl/src/approx/derivative.lisp b/cl/src/approx/derivative.lisp deleted file mode 100644 index 02fcb4c..0000000 --- a/cl/src/approx/derivative.lisp +++ /dev/null @@ -1,9 +0,0 @@ -(in-package :lizfcm.approx) - -(defun derivative-at (f x &optional (delta 0.01)) - (let* ((x2 (+ x delta)) - (x1 (- x delta)) - (y2 (apply f (list x2))) - (y1 (apply f (list x1)))) - (/ (- y2 y1) - (- x2 x1)))) diff --git a/cl/src/approx/maceps.lisp b/cl/src/approx/maceps.lisp deleted file mode 100644 index ad234e8..0000000 --- a/cl/src/approx/maceps.lisp +++ /dev/null @@ -1,11 +0,0 @@ -(in-package :lizfcm.approx) - -(defun compute-maceps (f a init) - (let ((h init) - (err init)) - (loop while (> err 0) - do - (setf h (/ h 2) - err (abs (- (funcall f (+ a h)) - (funcall f a)))) - collect (list a h err)))) diff --git a/cl/src/approx/package.lisp b/cl/src/approx/package.lisp deleted file mode 100644 index c11eb60..0000000 --- a/cl/src/approx/package.lisp +++ /dev/null @@ -1,5 +0,0 @@ -(in-package :cl-user) -(defpackage lizfcm.approx - (:use :cl) - (:export :derivative-at - :compute-maceps)) diff --git a/cl/src/package.lisp b/cl/src/package.lisp deleted file mode 100644 index 88b10eb..0000000 --- a/cl/src/package.lisp +++ /dev/null @@ -1,7 +0,0 @@ -(in-package :cl-user) -(defpackage lizfcm.vector - (:use :cl) - (:export - :n-norm - :max-norm - :distance)) diff --git a/cl/src/utils/package.lisp b/cl/src/utils/package.lisp deleted file mode 100644 index bdd5589..0000000 --- a/cl/src/utils/package.lisp +++ /dev/null @@ -1,5 +0,0 @@ -(in-package :cl-user) -(defpackage lizfcm.utils - (:use :cl) - (:export :within-range-p - :table)) diff --git a/cl/src/utils/table.lisp b/cl/src/utils/table.lisp deleted file mode 100644 index e96f37b..0000000 --- a/cl/src/utils/table.lisp +++ /dev/null @@ -1,11 +0,0 @@ -(in-package :lizfcm.utils) - -(defmacro table ((&key headers domain-order domain-values) &body body) - `(cons - ,headers - (mapcar (lambda (tuple) - (destructuring-bind ,domain-order tuple - (append tuple - (list - ,@body)))) - ,domain-values))) diff --git a/cl/src/utils/within-range.lisp b/cl/src/utils/within-range.lisp deleted file mode 100644 index 9a0b762..0000000 --- a/cl/src/utils/within-range.lisp +++ /dev/null @@ -1,5 +0,0 @@ -(in-package :lizfcm.utils) - -(defun within-range-p (x true-value delta) - (and (< x (+ true-value delta)) - (> x (- true-value delta)))) diff --git a/cl/src/vector/distance.lisp b/cl/src/vector/distance.lisp deleted file mode 100644 index 74631ce..0000000 --- a/cl/src/vector/distance.lisp +++ /dev/null @@ -1,6 +0,0 @@ -(in-package :lizfcm.vector) - -(defun distance (v1 v2 norm) - (let* ((d (mapcar #'- v1 v2)) - (length (funcall norm d))) - length)) diff --git a/cl/src/vector/norm.lisp b/cl/src/vector/norm.lisp deleted file mode 100644 index 2158296..0000000 --- a/cl/src/vector/norm.lisp +++ /dev/null @@ -1,17 +0,0 @@ -(in-package :lizfcm.vector) - -(defun p-norm (p) - (lambda (v) - (expt - (reduce (lambda (acc x) - (+ acc x)) - (mapcar (lambda (x) - (abs - (expt x p))) - v)) - (/ 1 p)))) - -(defun max-norm (v) - (reduce (lambda (acc x) - (max acc x)) - v)) diff --git a/cl/src/vector/package.lisp b/cl/src/vector/package.lisp deleted file mode 100644 index 009b190..0000000 --- a/cl/src/vector/package.lisp +++ /dev/null @@ -1,7 +0,0 @@ -(in-package :cl-user) -(defpackage lizfcm.vector - (:use :cl) - (:export - :p-norm - :max-norm - :distance)) diff --git a/cl/tests/approx.lisp b/cl/tests/approx.lisp deleted file mode 100644 index 2fd8124..0000000 --- a/cl/tests/approx.lisp +++ /dev/null @@ -1,24 +0,0 @@ -(defpackage lizfcm/tests.approx - (:use :cl - :fiveam - :lizfcm.approx - :lizfcm.utils - :lizfcm/tests) - (:export :approx-suite)) -(in-package :lizfcm/tests.approx) - -(def-suite approx-suite - :in lizfcm-test-suite) -(in-suite approx-suite) - -(test derivative-at - :description "derivative at is within bounds" - (let ((f (lambda (x) (* x x))) - (x 2) - (accepted-delta 0.02) - (f-prime-at-x 4) - (delta 0.01)) - (is (within-range-p - (derivative-at f x delta) - f-prime-at-x - accepted-delta)))) diff --git a/cl/tests/maceps.lisp b/cl/tests/maceps.lisp deleted file mode 100644 index cd5ced9..0000000 --- a/cl/tests/maceps.lisp +++ /dev/null @@ -1,27 +0,0 @@ -(defpackage lizfcm/tests.maceps - (:use :cl - :fiveam - :lizfcm.approx - :lizfcm.utils - :lizfcm/tests) - (:export :approx-suite)) -(in-package :lizfcm/tests.maceps) - -(def-suite maceps-suite - :in lizfcm-test-suite) -(in-suite maceps-suite) - -(test maceps - :description "double precision provides precision about (mac eps of single precision) squared" - (let* ((maceps-computation-double (compute-maceps (lambda (x) x) - 1.0d0 - 1.0d0)) - (maceps-computation-single (compute-maceps (lambda (x) x) - 1.0 - 1.0)) - (last-double-h (cadar (last maceps-computation-double))) - (last-single-h (cadar (last maceps-computation-single)))) - (is (within-range-p - (- last-double-h (* last-single-h last-single-h)) - 0 - last-single-h)))) diff --git a/cl/tests/suite.lisp b/cl/tests/suite.lisp deleted file mode 100644 index e23cfaf..0000000 --- a/cl/tests/suite.lisp +++ /dev/null @@ -1,10 +0,0 @@ -(in-package :cl-user) -(defpackage lizfcm/tests - (:use :cl - :fiveam) - (:export :run! - :lizfcm-test-suite)) -(in-package :lizfcm/tests) - -(def-suite lizfcm-test-suite - :description "The ultimate parent test suite") diff --git a/cl/tests/table.lisp b/cl/tests/table.lisp deleted file mode 100644 index 33d4e86..0000000 --- a/cl/tests/table.lisp +++ /dev/null @@ -1,31 +0,0 @@ -(defpackage lizfcm/tests.table - (:use :cl - :fiveam - :lizfcm.utils - :lizfcm/tests) - (:export :approx-suite)) -(in-package :lizfcm/tests.table) - -(def-suite table-suite - :in lizfcm-test-suite) -(in-suite table-suite) - -(defun fib (n) - (cond ((< n 2) n) - (t (+ (fib (- n 1)) (fib (- n 2)))))) - -(test table-of-fib-vals - :description "table generates correctly" - (let* ((headers '("n" "fib(n)")) - (n-values '((1) (2) (3) (4))) - (expected `(("n" "fib(n)") - (1 ,(fib 1)) - (2 ,(fib 2)) - (3 ,(fib 3)) - (4 ,(fib 4)))) - (tabled (lizfcm.utils:table (:headers headers - :domain-order (n) - :domain-values n-values) - (fib n)))) - (is (equal expected tabled)))) - diff --git a/cl/tests/vector.lisp b/cl/tests/vector.lisp deleted file mode 100644 index 3ffe5a8..0000000 --- a/cl/tests/vector.lisp +++ /dev/null @@ -1,31 +0,0 @@ -(defpackage lizfcm/tests.vector - (:use :cl - :fiveam - :lizfcm.vector - :lizfcm.utils - :lizfcm/tests) - (:export :vector-suite)) -(in-package :lizfcm/tests.vector) - -(def-suite vector-suite - :in lizfcm-test-suite) -(in-suite vector-suite) - -(test p-norm - :description "computes p-norm" - (let ((v '(1 1)) - (length (sqrt 2)) - (2-norm (p-norm 2))) - (is (within-range-p (funcall 2-norm v) - length - 0.00001)))) - -(test vector-distance - :description "computes distance via norm" - (let ((v1 '(0 0)) - (v2 '(1 1)) - (dist (sqrt 2))) - (is (within-range-p (distance v1 v2 (p-norm 2)) - dist - 0.00001)))) - diff --git a/class b/class new file mode 160000 index 0000000..0c4f1d7 --- /dev/null +++ b/class @@ -0,0 +1 @@ +Subproject commit 0c4f1d7f0e438fe37a9c5ae5cc67743233997042 diff --git a/homeworks/hw-2.org b/homeworks/hw-2.org index 90807b6..9dad2d3 100644 --- a/homeworks/hw-2.org +++ b/homeworks/hw-2.org @@ -9,7 +9,7 @@ Computing $\epsilon_{\text{mac}}$ for single precision numbers #+BEGIN_SRC lisp :session t :results table - (load "../cl/lizfcm.asd") + (load "../lizfcm.asd") (ql:quickload :lizfcm) (let ((domain-values (lizfcm.approx:compute-maceps (lambda (x) x) diff --git a/lizfcm.asd b/lizfcm.asd new file mode 100644 index 0000000..3e8c289 --- /dev/null +++ b/lizfcm.asd @@ -0,0 +1,39 @@ +(asdf:defsystem "lizfcm" + :version "0.1.0" + :author "Elizabeth Hunt" + :license "MIT" + :components ((:module "src" + :components + ((:module "utils" + :components + ((:file "within-range" :depends-on ("package")) + (:file "table" :depends-on ("package")) + (:file "package"))) + (:module "approx" + :components + ((:file "maceps" :depends-on ("package")) + (:file "derivative" :depends-on ("package")) + (:file "package"))) + (:module "vector" + :components + ((:file "distance" :depends-on ("norm" "package")) + (:file "norm" :depends-on ("package")) + (:file "package"))))))) + + +(asdf:defsystem "lizfcm/tests" + :author "Elizabeth Hunt" + :license "MIT" + :depends-on (:fiveam + :lizfcm) + :components ((:module "tests" + :components + ((:file "table" :depends-on ("suite")) + (:file "maceps" :depends-on ("suite")) + (:file "approx" :depends-on ("suite")) + (:file "vector" :depends-on ("suite")) + (:file "suite")))) + :perform (asdf:test-op (o c) (uiop:symbol-call + :fiveam :run! + (uiop:find-symbol* :lizfcm-test-suite :lizfcm/tests)))) + diff --git a/src/approx/derivative.lisp b/src/approx/derivative.lisp new file mode 100644 index 0000000..02fcb4c --- /dev/null +++ b/src/approx/derivative.lisp @@ -0,0 +1,9 @@ +(in-package :lizfcm.approx) + +(defun derivative-at (f x &optional (delta 0.01)) + (let* ((x2 (+ x delta)) + (x1 (- x delta)) + (y2 (apply f (list x2))) + (y1 (apply f (list x1)))) + (/ (- y2 y1) + (- x2 x1)))) diff --git a/src/approx/maceps.lisp b/src/approx/maceps.lisp new file mode 100644 index 0000000..ad234e8 --- /dev/null +++ b/src/approx/maceps.lisp @@ -0,0 +1,11 @@ +(in-package :lizfcm.approx) + +(defun compute-maceps (f a init) + (let ((h init) + (err init)) + (loop while (> err 0) + do + (setf h (/ h 2) + err (abs (- (funcall f (+ a h)) + (funcall f a)))) + collect (list a h err)))) diff --git a/src/approx/package.lisp b/src/approx/package.lisp new file mode 100644 index 0000000..c11eb60 --- /dev/null +++ b/src/approx/package.lisp @@ -0,0 +1,5 @@ +(in-package :cl-user) +(defpackage lizfcm.approx + (:use :cl) + (:export :derivative-at + :compute-maceps)) diff --git a/src/package.lisp b/src/package.lisp new file mode 100644 index 0000000..88b10eb --- /dev/null +++ b/src/package.lisp @@ -0,0 +1,7 @@ +(in-package :cl-user) +(defpackage lizfcm.vector + (:use :cl) + (:export + :n-norm + :max-norm + :distance)) diff --git a/src/utils/package.lisp b/src/utils/package.lisp new file mode 100644 index 0000000..bdd5589 --- /dev/null +++ b/src/utils/package.lisp @@ -0,0 +1,5 @@ +(in-package :cl-user) +(defpackage lizfcm.utils + (:use :cl) + (:export :within-range-p + :table)) diff --git a/src/utils/table.lisp b/src/utils/table.lisp new file mode 100644 index 0000000..e96f37b --- /dev/null +++ b/src/utils/table.lisp @@ -0,0 +1,11 @@ +(in-package :lizfcm.utils) + +(defmacro table ((&key headers domain-order domain-values) &body body) + `(cons + ,headers + (mapcar (lambda (tuple) + (destructuring-bind ,domain-order tuple + (append tuple + (list + ,@body)))) + ,domain-values))) diff --git a/src/utils/within-range.lisp b/src/utils/within-range.lisp new file mode 100644 index 0000000..9a0b762 --- /dev/null +++ b/src/utils/within-range.lisp @@ -0,0 +1,5 @@ +(in-package :lizfcm.utils) + +(defun within-range-p (x true-value delta) + (and (< x (+ true-value delta)) + (> x (- true-value delta)))) diff --git a/src/vector/distance.lisp b/src/vector/distance.lisp new file mode 100644 index 0000000..74631ce --- /dev/null +++ b/src/vector/distance.lisp @@ -0,0 +1,6 @@ +(in-package :lizfcm.vector) + +(defun distance (v1 v2 norm) + (let* ((d (mapcar #'- v1 v2)) + (length (funcall norm d))) + length)) diff --git a/src/vector/norm.lisp b/src/vector/norm.lisp new file mode 100644 index 0000000..2158296 --- /dev/null +++ b/src/vector/norm.lisp @@ -0,0 +1,17 @@ +(in-package :lizfcm.vector) + +(defun p-norm (p) + (lambda (v) + (expt + (reduce (lambda (acc x) + (+ acc x)) + (mapcar (lambda (x) + (abs + (expt x p))) + v)) + (/ 1 p)))) + +(defun max-norm (v) + (reduce (lambda (acc x) + (max acc x)) + v)) diff --git a/src/vector/package.lisp b/src/vector/package.lisp new file mode 100644 index 0000000..009b190 --- /dev/null +++ b/src/vector/package.lisp @@ -0,0 +1,7 @@ +(in-package :cl-user) +(defpackage lizfcm.vector + (:use :cl) + (:export + :p-norm + :max-norm + :distance)) diff --git a/tests/approx.lisp b/tests/approx.lisp new file mode 100644 index 0000000..2fd8124 --- /dev/null +++ b/tests/approx.lisp @@ -0,0 +1,24 @@ +(defpackage lizfcm/tests.approx + (:use :cl + :fiveam + :lizfcm.approx + :lizfcm.utils + :lizfcm/tests) + (:export :approx-suite)) +(in-package :lizfcm/tests.approx) + +(def-suite approx-suite + :in lizfcm-test-suite) +(in-suite approx-suite) + +(test derivative-at + :description "derivative at is within bounds" + (let ((f (lambda (x) (* x x))) + (x 2) + (accepted-delta 0.02) + (f-prime-at-x 4) + (delta 0.01)) + (is (within-range-p + (derivative-at f x delta) + f-prime-at-x + accepted-delta)))) diff --git a/tests/maceps.lisp b/tests/maceps.lisp new file mode 100644 index 0000000..cd5ced9 --- /dev/null +++ b/tests/maceps.lisp @@ -0,0 +1,27 @@ +(defpackage lizfcm/tests.maceps + (:use :cl + :fiveam + :lizfcm.approx + :lizfcm.utils + :lizfcm/tests) + (:export :approx-suite)) +(in-package :lizfcm/tests.maceps) + +(def-suite maceps-suite + :in lizfcm-test-suite) +(in-suite maceps-suite) + +(test maceps + :description "double precision provides precision about (mac eps of single precision) squared" + (let* ((maceps-computation-double (compute-maceps (lambda (x) x) + 1.0d0 + 1.0d0)) + (maceps-computation-single (compute-maceps (lambda (x) x) + 1.0 + 1.0)) + (last-double-h (cadar (last maceps-computation-double))) + (last-single-h (cadar (last maceps-computation-single)))) + (is (within-range-p + (- last-double-h (* last-single-h last-single-h)) + 0 + last-single-h)))) diff --git a/tests/suite.lisp b/tests/suite.lisp new file mode 100644 index 0000000..e23cfaf --- /dev/null +++ b/tests/suite.lisp @@ -0,0 +1,10 @@ +(in-package :cl-user) +(defpackage lizfcm/tests + (:use :cl + :fiveam) + (:export :run! + :lizfcm-test-suite)) +(in-package :lizfcm/tests) + +(def-suite lizfcm-test-suite + :description "The ultimate parent test suite") diff --git a/tests/table.lisp b/tests/table.lisp new file mode 100644 index 0000000..33d4e86 --- /dev/null +++ b/tests/table.lisp @@ -0,0 +1,31 @@ +(defpackage lizfcm/tests.table + (:use :cl + :fiveam + :lizfcm.utils + :lizfcm/tests) + (:export :approx-suite)) +(in-package :lizfcm/tests.table) + +(def-suite table-suite + :in lizfcm-test-suite) +(in-suite table-suite) + +(defun fib (n) + (cond ((< n 2) n) + (t (+ (fib (- n 1)) (fib (- n 2)))))) + +(test table-of-fib-vals + :description "table generates correctly" + (let* ((headers '("n" "fib(n)")) + (n-values '((1) (2) (3) (4))) + (expected `(("n" "fib(n)") + (1 ,(fib 1)) + (2 ,(fib 2)) + (3 ,(fib 3)) + (4 ,(fib 4)))) + (tabled (lizfcm.utils:table (:headers headers + :domain-order (n) + :domain-values n-values) + (fib n)))) + (is (equal expected tabled)))) + diff --git a/tests/vector.lisp b/tests/vector.lisp new file mode 100644 index 0000000..3ffe5a8 --- /dev/null +++ b/tests/vector.lisp @@ -0,0 +1,31 @@ +(defpackage lizfcm/tests.vector + (:use :cl + :fiveam + :lizfcm.vector + :lizfcm.utils + :lizfcm/tests) + (:export :vector-suite)) +(in-package :lizfcm/tests.vector) + +(def-suite vector-suite + :in lizfcm-test-suite) +(in-suite vector-suite) + +(test p-norm + :description "computes p-norm" + (let ((v '(1 1)) + (length (sqrt 2)) + (2-norm (p-norm 2))) + (is (within-range-p (funcall 2-norm v) + length + 0.00001)))) + +(test vector-distance + :description "computes distance via norm" + (let ((v1 '(0 0)) + (v2 '(1 1)) + (dist (sqrt 2))) + (is (within-range-p (distance v1 v2 (p-norm 2)) + dist + 0.00001)))) + -- cgit v1.2.3-70-g09d2