Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Puzzle: The Ham Cheese Sandwich cut.

by Anonymous Monk
on Nov 17, 2005 at 19:02 UTC ( [id://509522]=note: print w/replies, xml ) Need Help??


in reply to Puzzle: The Ham Cheese Sandwich cut.

I assume we're supposed to take constant time comparison as an axiom?
use Math::BigInt; use Benchmark qw( cmpthese ) ; my $x = (new Math::BigInt 2)**(2**16); my $y = $x - 1; my $m = new Math::BigInt 2; my $n = $m + 1; cmpthese(-1, { large => sub{ $y < $x }, small => sub{ $m < $n } });

Replies are listed 'Best First'.
Re^2: Puzzle: The Ham Cheese Sandwich cut.
by Perl Mouse (Chaplain) on Nov 18, 2005 at 10:06 UTC
    I assume we're supposed to take constant time comparison as an axiom?
    Yes.
    Perl --((8:>*

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://509522]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-19 15:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found