> 
> $slope = ($ARGV[1] - $ARGV[3]) / ($ARGV[0] - $ARGV[2]);
> $b = $ARGV[1] - ($ARGV[0] * $slope);
> print "\n$ARGV[1] = $slope * $ARGV[0] + $b\n";
> 
> For this input :
> 
>  perl my_program 16.81 16.57 0 0
> 
> It gives me this result :
> 
>  16.57 = 0.985722784057109 * 16.81 + 0
> 
> Clearly b can be 0 only if the slope is 1. 

Not at all clear to me ... Since one of the given points is at the
origin, then the intercept *MUST* be zero.

> I don't know the reason for
> this result (I guess precission but that's the only thing I could
> say), neither how to solve it.
> Please what should I do to get the correct result?
> 
> Thank you
> 
> camotito
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> http://learn.perl.org/
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to