Skip to content

Commit fa44fcb

Browse files
committed
More fixes
1 parent 551c123 commit fa44fcb

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/interface.rkt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@
4040

4141
(define (shift bits fn)
4242
(define shift-val (expt 2 bits))
43-
(λ (x) (+ (fn x) shift-val)))
43+
(λ (x) (fn (- x shift-val))))
4444

4545
(define (unshift bits fn)
4646
(define shift-val (expt 2 bits))
47-
(λ (x) (fn (- x shift-val))))
47+
(λ (x) (+ (fn x) shift-val)))
4848

4949
(define-representation (binary64 real)
5050
bigfloat->flonum
5151
bf
52-
(unshift 63 ordinal->flonum)
53-
(shift 63 flonum->ordinal)
52+
(shift 63 ordinal->flonum)
53+
(unshift 63 flonum->ordinal)
5454
64
5555
'(+nan.0 +inf.0 -inf.0))
5656

src/web/common.rkt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
(define (fpcore->string core)
1616
(match-define (list 'FPCore args props ... expr) core)
1717
(define props* ; make sure each property (name, value) gets put on the same line
18-
(for/list ([val (apply dict-set* '() props)]) ; how to make a list of pairs from a list
19-
(format "~a ~a" (car val) (cdr val))))
18+
(for/list ([(prop name) (in-dict (apply dict-set* '() props))]) ; how to make a list of pairs from a list
19+
(format "~a ~a" prop name)))
2020
(pretty-format `(,(format "FPCore ~a" args) ,@props* ,expr) #:mode 'display))
2121

2222
(define/contract (render-menu sections links)

0 commit comments

Comments
 (0)