Re: Just for fun: Shortest InputForm to achieve a given Kernel error
- To: mathgroup at smc.vnet.net
- Subject: [mg82123] Re: [mg82031] Just for fun: Shortest InputForm to achieve a given Kernel error
- From: "厉正吉" <zhengji.li at gmail.com>
- Date: Fri, 12 Oct 2007 03:05:20 -0400 (EDT)
- References: <200710100821.EAA26453@smc.vnet.net>
I have found 2 answers after some try. For General::ovfl: 9^99! For $IterationLimit::itlim: #0@# &@1 On 10/10/07, Andrew Moylan <andrew.j.moylan at gmail.com> wrote: > "1/0" is a string of length 3 which, when interpreted as InputForm (in a > clean Kernel), generates a Power::infy error: > > ToExpression["1/0", InputForm]; > >> Power::infy: Infinite expression 1/0 encountered. > > I think this is the shortest string with this property. > > Here are some other errors and the lengths of the shortest strings I can > find to generate them: > > $RecursionLimit::reclim: Recursion depth of 256 exceeded. > Input length: 4 > > General::ovfl: Overflow occurred in computation. > Input length: 5 > > (Kernel running out of memory) > Input length: 5 > > General::unfl: Underflow occurred in computation. > Input length: 6 > > $IterationLimit::itlim: Iteration limit of 4096 exceeded. > Input length: 7 > > Can you figure out how to generate those errors with input strings of that > length? Can you find any *shorter* solutions? > > > -- Li Zhengji ------------------------------------------------------------- If all you have is a hammer, everything is a nail. -------------------------------------------------------------
- References:
- Just for fun: Shortest InputForm to achieve a given Kernel error
- From: "Andrew Moylan" <andrew.j.moylan@gmail.com>
- Just for fun: Shortest InputForm to achieve a given Kernel error