Results 1 to 2 of 2

Thread: PHP-problem

  1. #1
    Marlon Guest

    PHP-problem

    Hi,

    i wrote a calculator-PHP-script and it looks like this:
    http://phptestacc.ph.ohost.de/Taschenrechner3.php

    but there is a problem when i exponentiate a number, for example i put 455 and 23 in the boxes, then as a result comes:
    455^23 ist 1.3622666451E+61
    23^455 ist INF

    but thats wrong, right? So what can i do?


    I am sorry for my english, I am from Germany

  2. #2
    Join Date
    Dec 2009
    Location
    Carrollton, GA - USA
    Posts
    67
    well I am pretty sure that in php
    PHP Code:
    INF 
    means Infinity - so I would assume that the script and/or php just can't handle the calculation.

    I tried to do:
    PHP Code:
    <?
    echo pow(23,455);
    ?>
    on my server and got the same
    Code:
    INF
    but

    PHP Code:
    <?
    echo pow(455,23);
    ?>
    returns:

    Code:
    1.3622666451E+61
    why not just stick to a trusty scientific calculator?

Similar Threads

  1. Flash mail form + php big problem
    By irka in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 09 Dec 2009, 07:00 AM
  2. PHP form submit problem
    By simononestop in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 15 Jun 2009, 10:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •