-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Description
There are a few errors in sections 1.6: Floating Point Numbers and 1.7: Tuples of the Programming in Cryptol textbook.
The first two, in section 1.6, were just minor typos:
Floating point numbers may be written using either integral or fractioanl literals. In general, literals that cannot be represented exactly are rejected with a type error, with the exception of decimal fractional litrals which are rounded to the nearest even representable numbers.
(emphasis added)
The last error was in Exercise 1.7, of section 1.7.

The textbook says that the answers to the last two problems should be as follows:

However, this results in the error message
Cryptol> ((1, 2), False, (3-1, (4, True))).2.1
Parse error at <interactive>:1:35,
unexpected: 2.1
Extra parentheses are needed in order to make these projections run without errors.
Cryptol> (((1, 2), False, (3-1, (4, True))).2).1
Showing a specific instance of polymorphic result:
* Using 'Integer' for type of 0th tuple field
(4, True)
and
Cryptol> ((((1, 2), (2, 6, (True, 4)), False).1).2).0
True
respectively.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels