diff --git a/racket/syndicate/examples/actor/f-to-c.rkt b/racket/syndicate/examples/actor/f-to-c.rkt index 016eef6..4e3f0dd 100644 --- a/racket/syndicate/examples/actor/f-to-c.rkt +++ b/racket/syndicate/examples/actor/f-to-c.rkt @@ -41,15 +41,15 @@ (spawn (versioned-field [C 0] [F 32]) (begin/dataflow - (F (exact->inexact (+ (* (C) 9/5) 32)) C) - (C (exact->inexact (* (- (F) 32) 5/9)) F)) + (F (+ (* (C) 9/5) 32) C) + (C (* (- (F) 32) 5/9) F)) (assert (temperature 'C (C))) (assert (temperature 'F (F))) (on (message (set-temperature 'C $v)) (C v)) (on (message (set-temperature 'F $v)) (F v))) (spawn (on (asserted (temperature $unit $value)) - (printf "Temperature in ~a is ~a\n" unit value))) + (printf "Temperature in ~a is ~a\n" unit (exact->inexact value)))) (spawn (on (asserted (observe (set-temperature _ _))) (send! (set-temperature 'C 20)) diff --git a/racket/syndicate/examples/actor/f-to-c2.rkt b/racket/syndicate/examples/actor/f-to-c2.rkt index 699f409..4815e11 100644 --- a/racket/syndicate/examples/actor/f-to-c2.rkt +++ b/racket/syndicate/examples/actor/f-to-c2.rkt @@ -11,17 +11,17 @@ (on (message (set-temperature 'C $new-temp)) (temp new-temp)) (on (asserted (temperature 'F $other-temp)) - (temp (exact->inexact (* (- other-temp 32) 5/9))))) + (temp (* (- other-temp 32) 5/9)))) (spawn (field [temp 32]) (assert (temperature 'F (temp))) (on (message (set-temperature 'F $new-temp)) (temp new-temp)) (on (asserted (temperature 'C $other-temp)) - (temp (exact->inexact (+ (* other-temp 9/5) 32))))) + (temp (+ (* other-temp 9/5) 32)))) (spawn (on (asserted (temperature $unit $value)) - (printf "Temperature in ~a is ~a\n" unit value))) + (printf "Temperature in ~a is ~a\n" unit (exact->inexact value)))) (spawn (on (asserted (observe (set-temperature _ _))) ;; (send! (set-temperature 'C 20))