Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    my $y1 = (-$B + sqrt($B**2 - 4 * $A * $C)) / (2 * $A);
    my $y2 = (-$B - sqrt($B**2 - 4 * $A * $C)) / (2 * $A);
    printf "Roots: %.3f or %.3f\n\n", $y1, $y2;
    
  2. or download this
    1962 318
    1982 341
    2002 373
    
  3. or download this
    # i686 running Linux with perl-5.10.0
      0.011256        -43.244877      41833.442623
    ...
    # After adding "use bignum;" on either of the last two
      0.011250        -43.220000      41809.395000
      Roots: 2083.912 or 1757.866