Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Calculate Your Weight On Various Heavenly Bodies

by Discipulus (Canon)
on May 16, 2007 at 12:27 UTC ( [id://615760]=note: print w/replies, xml ) Need Help??


in reply to Calculate Your Weight On Various Heavenly Bodies

I really hope your default is in lbs...but
if ($default->is_KG()){ require Rope; my $exerc = Rope->new(weight=>'+5'); $exerc->skipping until $default < 100; }
kidding..

Replies are listed 'Best First'.
Re^2: Calculate Your Weight On Various Heavenly Bodies
by jettero (Monsignor) on May 16, 2007 at 12:38 UTC

    I really hope your default is in lbs

    I'm a big fan of using units. There wasn't really anything (update: unit-self-aware) on CPAN at the time, so I wrote Math::Units::PhysicalValue, which would make the initial weight so much clearer.

    use Math::Units::PhysicalValue qw(PV); my $weight = PV "170 lb"; my $mass = $weight + "0 kg"; print "My mass on earth at sea level is $mass.\n";

    -Paul

      I feel obligated to point out here that your mass is not dependent on your position. :-) (Oddly enough, though, nobody seems to want to figure their weight in Newtons.)



      If God had meant us to fly, he would *never* have given us the railroads.
          --Michael Flanders

Re^2: Calculate Your Weight On Various Heavenly Bodies
by Ovid (Cardinal) on May 16, 2007 at 13:39 UTC

    Yes, that default is definitely pounds, not stone, kilograms, ounces (avoirdupois or otherwise), or anything else. It's still too high of a default, though.

    Cheers,
    Ovid

    New address of my CGI Course.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2025-04-22 14:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.