Best search algorithm to find condition within a range

Cameron Simpson cs at zip.com.au
Tue Apr 7 18:51:24 EDT 2015


On 08Apr2015 08:36, Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:
>On Wed, 8 Apr 2015 12:36 am, jonas.thornvall at gmail.com wrote:
>> Bullshit declare two integers in any language one 7 and one 4 and then
>> write x=7+4; if you find a programming language where that does not yield
>> 11 tell me.
>
>In Forth, you can set the base to any arbitrary integer (within reason).
[...snip...]

In dc also (UNIX's reverse polish arbitrary precision "decimal calculator").  
You can set the input and output representation bases, and proceed without 
leading base indicators.

Cheers,
Cameron Simpson <cs at zip.com.au>

Hofstadter's Law: It always takes longer than you expect, even when you take
into account Hofstadter's Law.
- Douglas Hosfstadter, Godel, Escher, Bach: an Eternal Golden Braid



More information about the Python-list mailing list