http://qs321.pair.com?node_id=173957


in reply to perl to protoype algorithms

First, are you meaning to call a sub routine? $r=c($w/24); If you are, you need to post it. When I change that line to $r=($w/24); I get the same answer as java.

As for prototyping in another language, I tend to avoid it. Each language will have some features/bugs that don't exist in the language you are prototyping in, which can either cause problems in the conversion, or not let you make use of the features of that language.

Replies are listed 'Best First'.
Re: Re: perl to protoype algortithms
by adamcrussell (Hermit) on Jun 12, 2002 at 18:51 UTC
    For some very annoying reason I cannot update this node. The line you mention is, in fact , a typo and should read
    $r=ceil($w/24)
    The ceil function is provided by the POSIX module.