Format fix 2006/hamre/README.md + update bugs.md
There are a few 'issues' that are INABIAF so these were noted in the README.md and the bugs.md. You might find some punning there.
This commit is contained in:
1 parent
feb0e3eb37
commit
d0b357e4c5
2 files changed
+35
-11
No files matched your search
+23
-11
@@ -1,7 +1,7 @@
|
||||
# Most Irrational
|
||||
|
||||
Steinar Hamre
|
||||
Norway
|
||||
Steinar Hamre
|
||||
Norway
|
||||
|
||||
## To build:
|
||||
|
||||
@@ -21,28 +21,40 @@ make
|
||||
./hamre '-1+4/3*(2+1/(3/2*(7/2-7/3+1/6)))/2'
|
||||
```
|
||||
|
||||
### INABIAF - it's not a bug it's a feature! :-)
|
||||
|
||||
This program will very likely crash or do something completely irrational :-) if you
|
||||
don't supply it with an argument.
|
||||
|
||||
As well supplying more arguments will possibly limit the number of nested
|
||||
operators supported.
|
||||
|
||||
Don't try dividing by 0 (zero).
|
||||
|
||||
## Judges' remarks:
|
||||
|
||||
An irrationally coded source presents rational things!
|
||||
|
||||
A rational person might want to attempt the irrational task
|
||||
A rational person might want to attempt the
|
||||
[irrational](https://rationalwiki.org/wiki/Rationality) task
|
||||
of supporting a new operator by way of an existing macro
|
||||
in the source. And can you determine which macro this is
|
||||
and understand the purpose of its arguments?
|
||||
|
||||
## Author's remarks:
|
||||
|
||||
This is a calculator for rational numbers. Believe it or not, that is
|
||||
a useful tool to have around, and I haven't found a useful version,
|
||||
much less an obfuscated one.
|
||||
This is a calculator for [rational
|
||||
numbers](https://en.wikipedia.org/wiki/Rational_number). Believe it or not, that
|
||||
is a useful tool to have around, and I haven't found a useful version, much less
|
||||
an obfuscated one.
|
||||
|
||||
It is rather feature complete as rational calculators go. The
|
||||
It is rather feature complete as [rational calculators go. The
|
||||
supported operators are: `+`, `-` (binary and unary), `*`, `/` and `()`. Run it
|
||||
by supplying an expression as the first argument, and the normalized
|
||||
result will be written to stdout.
|
||||
|
||||
```sh
|
||||
$ ./hamre '-1+4/3*(2+1/(3/2*(7/2-7/3+1/6)))/2'
|
||||
./hamre '-1+4/3*(2+1/(3/2*(7/2-7/3+1/6)))/2'
|
||||
2/3
|
||||
```
|
||||
|
||||
@@ -50,7 +62,7 @@ If you do not supply an argument, the calculator will crash. Other
|
||||
arguments are ignored. Supplying more arguments may further limit the
|
||||
number of nested operators supported.
|
||||
|
||||
Remember that 1/0 is not a rational number. You will not get any
|
||||
Remember that `1/0` is not a rational number. You will not get any
|
||||
answer if you divide by zero.
|
||||
|
||||
By default, only 31 nested levels of operators are supported.
|
||||
@@ -62,9 +74,9 @@ comes to understanding the source. The preprocessed source becomes
|
||||
rather verbose.
|
||||
|
||||
IOCCC entries are often loaded with all kinds of hard-coded numbers. I
|
||||
have restricted myself to mostly use sensible numbers (<= 7) as
|
||||
have restricted myself to mostly use sensible numbers (`<= 7`) as
|
||||
smaller numbers are much easier to remember. Also the macros really
|
||||
help hiding most of the uses of these numbers away. All macros and
|
||||
help hide most of the uses of these numbers away. All macros and
|
||||
variables are easy-to-remember single character abbreviations, from
|
||||
some language, meaningful to the purpose(s) of the macro, I hope.
|
||||
|
||||
|
||||
@@ -1760,6 +1760,18 @@ to including the [IOCCC website](https://www.ioccc.org) itself.
|
||||
|
||||
|
||||
# 2006
|
||||
|
||||
## [2006/hamre](2006/hamre/hamre.c) ([README.md](2006/hamre/README.md))
|
||||
## STATUS: INABIAF - please **DO NOT** fix
|
||||
|
||||
This program will very likely crash or do something completely irrational :-) if
|
||||
you don't supply it with an argument.
|
||||
|
||||
As well supplying more arguments will possibly limit the number of nested
|
||||
operators supported.
|
||||
|
||||
Don't try dividing by 0 (zero).
|
||||
|
||||
# 2007
|
||||
# 2008
|
||||
# 2009
|
||||
|
||||
Reference in new issue
Block a user