56
13
In as few bytes as possible, your job is to write a program that outputs:
3.14
In celebration of a late Pi day of course! :)
Rules
You can do it anyway you like, but there are some restrictions.
- You may not use arithmetic operations anywhere in your program. This includes
+
,-
,*
,/
,%
,^
(exponentiation), etc... This also includes incrementing (usually++
), decrementing (--
), bitwise operations, and any built in functions that can be used as a replacement such assum()
,prod()
,mod()
,double()
,pow()
,sqrt()
,inc()
,dec()
, etc... (Author's discretion) - The digits
3
,1
, and4
may not appear anywhere in your code. - You may not use any predefined variables/constants that your language may have as a replacement for
3
,1
, and4
. (Author's discretion) - You may also not use any trigonometric functions such as
sin()
,cos()
,tan()
,arcsin()
,arccos()
,arctan()
,sinh()
,cosh()
,tanh()
, etc... (Author's discretion) - You may not use built-in or predefined values of Pi (or
3.14
). No web requests. - Your program cannot require input of any kind (besides running it).
3.14
is the only thing that you may output, it cannot be part of some longer/larger output..
Winner
The answer with the least amount of bytes on April 18th wins. Good luck!
Looking forward to clever answers from clever minds! Malbolge anyone? :P
Ask questions in the comments if anything is unclear. – kukac67 – 2014-04-10T15:55:23.877
3You may want to clarify that
^
is the exponentiation operator, not bitwise XOR operator. – user12205 – 2014-04-10T16:05:14.1432Are bitwise operators allowed? – ProgramFOX – 2014-04-10T16:07:09.450
1@ProgramFOX Well, they can be used as a replacement for normal operations, so, no. Not allowed. I'll edit the post. – kukac67 – 2014-04-10T16:09:27.823
1Web requests allowed? – swish – 2014-04-10T16:35:27.657
7
@swish: I wouldn't use web requests, because that belongs to the list of Standard "loopholes" which are no longer funny
– ProgramFOX – 2014-04-10T16:38:08.1301@swish I agree with ProgramFox. No web requests. I'll add it to the post. – kukac67 – 2014-04-10T16:39:44.853
1Can I use
-
to indicate negative numbers like-2.0
? – user80551 – 2014-04-10T17:19:15.223@user80551 yes you can – kukac67 – 2014-04-10T19:31:12.907
1Somehow I think this would have been interesting with more digits (like
3.14159265
or whatever), because just 3.14 makes me sad. – Pierre Arlaud – 2014-04-11T12:43:38.490@kukac67 Can you clarify No web requests? I think the point is that information requested from the internet is not allowed. To me web implies just
– Digital Trauma – 2014-04-11T17:21:30.450http
andhttps
. What about e.g.ftp
? What about this answer which sends an ICMP request, but does not require any response for it to work?1@DigitalTrauma The answer you linked to is fine. It's not really getting anything from the web. I just wanted to prevent linking to file on the web that contains
3.14
and outputting that. – kukac67 – 2014-04-11T18:16:13.0801too bad modulus counts as arithmetic, otherwise 9%5.86 (e.g. in bc) would have been unbeatable – jaap – 2014-04-11T23:05:44.690
Piet might almost count. No visible arithmetic unless you decode it ;) – Izkata – 2014-04-14T18:06:50.763
I expect a Perl one with only keywords (or maybe quoteless string literals). http://www.perlmonks.org/?node_id=290607
– Ming-Tang – 2014-04-15T21:04:03.427Even though I have more than 10 reputation, I cannot seem to add an answer. I definitely think you should have allowed more digits. credit for more digits offset against characters for the code.
Also, I think you should allow leading zeros In octave: datestr(581540,'mm.dd') (23 bytes) yields: 03.14 – Dov – 2014-04-17T02:34:54.757
/me writes programming language where ⌘ outputs 3.14 – Kaz Wolfe – 2014-04-19T21:17:47.770
Does the program have to have the same output no matter which day it runs? For example, can I just output the current date in an
M.dd
format, and insist that you run my program on 14 March? – Dawood says reinstate Monica – 2014-04-20T04:23:53.650