Author Topic: The calculator  (Read 44715 times)

RuiLoureiro

  • Member
  • ****
  • Posts: 671
The calculator
« on: May 31, 2012, 10:59:09 PM »
 :biggrin:
Hi all
        This version is the result of what i learned
        till now. Some procedures are now lighter.
        Some strategies was corrected.
        Now, we have not "division by 0" but infinity.
        In this way, 1/(log(10)-1)* 0 gives "Indeterminate form"
        and not "division by 0".
       
        Now, it is time for corrections and improvements.
        Meanwhile, the calculator should solve any expression. ;)

        **** Here is calcula48 v1.08 ****

        Calculation rules

            1. terms inside parentheses or brackets
            2. functions
            3. exponents or powers
            4. multiplication and division
            5. addition and subtraction
           
    note 1: if we end a pair of brackets with !
            we must have a positive integer inside:      (12-3)!

    note 2: the exponents are treated as

            a)  real:       it is the general case
            b)  integer:    enclosed by brackets       (1-log(3))^(-2)   
            c)  rational:   enclosed by brackets       (1-log(3))^(-2/3)         

    note 3: roots are calculated following this rule:

            1. put the expression inside brackets:      (log(3)-log(2)*2)
            2. put the rational exponent inside brackets:   (n/k)
            3. use "^"
                        (log(3)-log(2)*2)^(n/k)

            square root: sqr(2*log(2)-log(3))=(2*log(2)-log(3))^(1/2)
                         = 0.353466740455591 = 0.353466740455591
                         
    note 4: exponents or powers are calculated starting at the end

            4^3^2:  first: 3^2 = 9  second: 4^9     4^3^2 = 262144.0

            (4^3)^2 = 64.0 ^2 = 4096.0

           
        We can define:
                        1. a set of 10 constants: type  t=10; s=2.25;u=-2.5e-3;

                        2. a function:      type    f(x)=x^2/(1-x)

                        3. a derivative:    type   df(x)=2*x-1
                       
                        4. up to 20 matrices, up to a 20*20 matrix:
                       
                        a=[1,2,2];          vector column       3 columns
                        b=[1;2;3];             "   line         3 lines
                        c=[1,2;2,3];        squared matrix

        We can solve:
                        1. Any expression
                        2. Mean(x1,...,xn):                  mean(12,13,12,13,14)
                        3. Factorial and k-combination of n: 12!, comb(12,3)
                        4. Logarithms of any base:           logb(15.2, 5)
                        5. Quadratic equations: aX^2+bX+c=c0
                        6. Systems of 2 equations: type aX+bY=c;fX+gY=h;
                        7. Systems of 3 equations: type aX+bY+cZ=d;fX+gY+hZ=i;                                                        jX+kY+mZ=l;
                        8. Systems of 4 equations: type aX+bY+cZ+dT=f;   
                                                                            gX+hY+iZ+jT=k;
                                                        lX+mY+nZ+oT=p;qX+rY+sZ+tT=u;

                        (note: a,b,c, ... are real numbers)

                        9. Conversion decimal-binary-hexadecimal - any 64-bit number

                           conv(11000) = 00002AF8H
                           conv(11000b)= 24
                           conv(11000h)= 69632

                       10. Linear interpolation:     type: point(1,2; 3,5) and g(x=2)
                                                                           or g(y=2)

                       11. The equation f(x)=0

                           a) root(x=-20, x=20; n=200)

                           b) root(x=-20, x=20; d=0.01)

                           c) root(x=-20, x=20; x=1.2)

                        note: in root(x=a, x=b; x=X0 ) a, b, X0 can be
                              -9pi,...,-1pi, -pi, pi, 2pi, 3pi,...,9pi,
                              -9e,...,-1e, -e, e, 2e, 3e,...,9e.

        Matrix operations

                . Copy

                    a=[1, 2; 3, 4];                     [press ENTER/COMPUTE]
                   
                    b=a;                                [press ENTER/COMPUTE]

                  Now we have a, b and a equal b

                . Addiction

                    a1=[1, 2; 3, 4];                    [press ENTER/COMPUTE]
                    a2=[5, 6; 7, 8];                    [press ENTER/COMPUTE]

                    a=a1+a2;                            [press ENTER/COMPUTE]

                . Subtraction

                    a1=[1, 2; 3, 4];                    [press ENTER/COMPUTE]
                    a2=[5, 6; 7, 8];                    [press ENTER/COMPUTE]

                    b=a1-a2;                            [press ENTER/COMPUTE]

                . Multiplication

                    a1=[1, 2; 3, 4];                    [press ENTER/COMPUTE]
                    a2=[5, 6; 7, 8];                    [press ENTER/COMPUTE]

                    c=a1*a2;                            [press ENTER/COMPUTE]

                . Scalar multiplication

                    a1=[1, 2; 3, 4];                    [press ENTER/COMPUTE]
                               
                    d=10 * a1;                          [press ENTER/COMPUTE]
                   
                    f=+ a1;                             [press ENTER/COMPUTE]
                   
                    g=- a1;                             [press ENTER/COMPUTE]

                . Transpose matrix

                    a1=[1, 2; 3, 4];                    [press ENTER/COMPUTE]

                    b=a1^t;                             [press ENTER/COMPUTE]
                  or
                    b=a1^T;                             [press ENTER/COMPUTE]

                    we get b=[ 1.0, 3.0; 2.0, 4.0];

                . Inverse matrix

                    a1=[1, 2; 3, 4];                    [press ENTER/COMPUTE]

                    b=a1^-1;                            [press ENTER/COMPUTE]
                    b=inv(a1)
                   
                    we get b=[-2.0, 1.0; 1.5,-0.5];

                . Determinant of a square matrix

                    . type
                            delta(a)                    [press ENTER/COMPUTE]
                            det(a)
                           
                            where a is a matrix name

        INFINITY and Indeterminate forms

            Use 1/0 or (1/0) for generate the infinity
           
            arcsec(1/0)= 1.570796326794897  arctan(1/0)= 1.570796326794897
            arctan(1/0)= 1.570796326794897  arccot(1/0)= 0
           
            1.570796326794897 = pi/2

            0/0 = Indeterminate form   
            0^0 = Indeterminate form
            (1/0)/(1/0) = Indeterminate form
            (1/0)* 0    = Indeterminate form
                                                                                     
        Detailed questions about pi

            Now, when we use pi we dont need to use *

            In this way, we can type any expression with pi like 

                        n pi  OR  +n pi  OR  -n pi       ( n integer )

                        r pi  OR  +r pi  OR  -r pi       ( r real, scientific notation)

            It is the same as
           
                        n*pi,     +n*pi,     -n*pi       ( we dont need to type * )

                        r*pi,     +r*pi,     -r*pi       ( we dont need to type * )

        Symbols

                    Type list and press ENTER/COMPUTE
                   
        Length of an expression or matrix

                    The calculator supports any expression or
                    matrix up to 3800 characters.

        Memories

                    The calculator has 6 memories to save any
                    expression or matrix in the input box.

        error function

                    Some functions use the system error = 1e-3
               
                    To set it to 1e-5, type error(1e-5)
                    and press ENTER/COMPUTE

        printing on the paper

                    . print()   prints the last results
                    . print(a)  prints the matrix a

        Constant name or Matrix name

            . It must start with a letter and it can have
              up to 8 characters;       
   
            . Type the constant name or the matrix name
              and press ENTER/COMPUTE to see its definition or value.


        Constants

              Any integer or real number, scientific notation
                    e, +e, -e, pi, +pi, -pi


        Keys

              . ENTER to compute
              . DELETE to clean the input box

              . Use Home, End, Ctrl+Home, Ctrl+End etc.
                when we have the focus in the input box.

        Big expressions... or not

              We can use a text editor to type it.
              Then we copy and paste it into the edit box.

        Some numbers

              1700!   =  2.99835320555842E+4755
              e^10000 =  8.806818225662921E+4342

        Try it and say something.
        Good luck !
        Thanks       
        Rui Loureiro

EDIT: i decided to replace calcula50 by the new calcula51
         See the last post
        I made some corrections in Calcula50

        calcula51 has a new look

        Good luck
        Rui Loureiro

EDIT:   now we have Calcula55 the version 3.00.1 with new functions and the file of rules RulesV2_20.txt
Please, see the last post

EDIT: I replaced Calcula58 by the new powerful Calcula59
      It works with complex numbers. Please see the last post

EDIT: I replaced Calcula59 by the new powerful Calcula60
      It works with complex numbers and complex functions.
      Please see the last post

        note:   RulesV3_10_2I   - rules in English
                    RulesV3_10_2P   - regras em Português

EDIT: I replaced Calcula62 by the new powerful Calcula63
      Please see the last post to get the examples

       EDIT: I replaced calcula66 by calcula67
                       to correct some problems

          DERIVATIVES: compute a derivative
                of any function

                See the last post.
« Last Edit: September 05, 2014, 12:51:41 AM by RuiLoureiro »

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The calculator
« Reply #1 on: June 07, 2012, 04:11:25 AM »
Hi all
        News

            The previous calcula48 doesnt work with
            -INFINITY and +INFINITY.

            Now i never test for overflow or division by 0
            or other case than "invalid operation".
            After getting "invalid operation" we examine
            the case (we have 25 for powers).
            To have no problems, we should use fclex before.           


        **** Here is calcula49 v1.09 ****

            Now the calculator gives results from
            -INFINITY to +INFINITY or "indeterminate form"
            or ERROR.
           
            It seems also that i solved all cases of
            "indeterminate forms":

            0/0     00/00   00-00   0*00   

            0^0     1^+00   1^-00   +00^0   -00^0

            It gave me a lot of work to put it to work correctly
            and to test each case.

            Some cases:

            1/0^3 = +INFINITY       -(ln(e)-1)^-(1/0) = -INFINITY

            -(-2/0)^(1/(2+1))= -(-INFINITY)^0.333333333333333 = ERROR
            but
            -(-2/0)^(1/3) = +INFINITY

            (4*3-11)^-(3/(log(10)-1)) = Indeterminate form


        Try it and say something.
        Good luck !

        Thanks       
        Rui Loureiro

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The calculator
« Reply #2 on: June 10, 2012, 02:46:59 AM »
raymond,
         i added hyperbolic functions to calcula49
         and now i want to test it.
         I used your Ztest but i get this values
         (it seems that something is wrong)

                         Ztest                             calcula50
 arcsinh(1)= 0.881373587019543          0.881373587019543
 arccosh(1)=0.000000000931323           0
 arctanh(1)=21.48756259735830           +INFINITY
 arccoth(1)=21.48756259735830           +INFINITY
 arccsch(1)= 0.881373587019543          0.881373587019543
 arcsech(1)=0-i0.000000000931323        0

 arcsinh(-1234566677889e2345) = 0       -5428.096931407931
 arcsinh(-1234566677889e3345) = 0       -INFINITY

 arcsinh(+1234566677889e2345) = 0       5428.096931407931
 arcsinh(+1234566677889e3345) = 0       +INFINITY

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The calculator
« Reply #3 on: June 11, 2012, 12:13:28 AM »
Hi all

Hyperbolic functions:

Can anyone confirm this values ?
Thanks  ;)

sinh(x), tanh(x), coth(x), csch(x) are odd functions: sinh(-x)=-sinh(x)...
cosh(x), sech(x) are even functions: cosh(-x)=cosh(x)

sinh(-1/0) = -INFINITY
sinh(-1.234566677889e2375) = -INFINITY
sinh(-7200) = 4.161402346759365E+3126
sinh(-5) = -74.20321057778876

sinh(-1.0E-6) = -0.000001
sinh(0) = 0
sinh(+1.0E-6) =  0.000001

sinh(5) = 74.20321057778876
sinh(7200) =-4.161402346759365E+3126
sinh(1.234566677889e2375) = +INFINITY
sinh(1/0)= +INFINITY

cosh(-1/0) = +INFINITY
cosh(-1.234566677889e2375)= +INFINITY
cosh(-7200) = 4.161402346759365E+3126
cosh(-5) =  74.20994852478784

cosh(-1.0E-6) = 1.0000000000005
cosh(0) = 1.0
cosh(+1.0E-6) = 1.0000000000005

cosh(5) =   74.20994852478784
cosh(7200) = 4.161402346759365E+3126
cosh(1.234566677889e2375) = +INFINITY
cosh(1/0)= +INFINITY

tanh(-1/0) = -1.0
tanh(-1.234566677889e2375)= -1.0
tanh(-7200) =-1.0
tanh(-5) = -0.999909204262595

tanh(-1.0E-6) = -9.999999999996327E-0007
tanh(0) = 0
tanh(+1.0E-6) =  9.999999999996327E-0007

tanh(5) =  0.999909204262595
tanh(7200) = 1.0
tanh(1.234566677889e2375) = 1.0
tanh(1/0)= 1.0

coth(-1/0) = -1.0
coth(-1.234566677889e2375)= -1.0
coth(7200) = -1.0
coth(-5) = -1.000090803982019

coth(-1.0E-6) = -1000000.000000367
coth(0) = Undefined
coth(1.0E-6) =  1000000.000000367
 
coth(5) =   1.000090803982019
coth(7200) = 1.0
coth(1.234566677889e2375) =1.0
coth(1/0)= 1.0

sech(-1/0) = 0
sech(-1.234566677889e2375)= 0
sech(-7200) = 0
sech(-5) = 0.013475282221305

sech(-1.0E-6) =  0.9999999999995
sech(0) = 1.0
sech(+1.0E-6) =  0.9999999999995

sech(5) =  0.013475282221305
sech(7200) = 0
sech(1.234566677889e2375)= 0
sech(1/0)= 0

csch(-1/0) = 0
csch(-1.234566677889e2375)= 0
csch(-7200) = 0
csch(-5) = -0.013476505830589
csch(-1.0E-6) = -999999.9999998673
csch(0) = Undefined
csch( 1.0E-6) =  999999.9999998673
csch(5) =   0.013476505830589
csch(7200) = 0
csch(1.234566677889e2375)= 0
csch(1/0)= 0
« Last Edit: June 11, 2012, 06:05:31 AM by RuiLoureiro »

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
Re: The calculator
« Reply #4 on: June 11, 2012, 07:14:25 AM »
Using the Windows calculator:
Code: [Select]
sinh(-1/0) = -INFINITY                    will not paste
sinh(-1.234566677889e2375) = -INFINITY    too slow
sinh(-7200) = 4.161402346759365E+3126     -4.1614023467593632561951834091827e+3126
sinh(-5) = -74.20321057778876             -74.203210577788758977009471996065

-1.0e-6 :e
sinh(-1.0E-6) = -0.000001                 -0.000001000000000000166666666666675
sinh(0) = 0                               0
+1.0e-6 :e
sinh(+1.0E-6) =  0.000001                 0.000001000000000000166666666666675

sinh(5) = 74.20321057778876               74.203210577788758977009471996065
sinh(7200) =-4.161402346759365E+3126      4.1614023467593632561951834091827e+3126
sinh(1.234566677889e2375) = +INFINITY     invalid input for function
sinh(1/0)= +INFINITY                      will not paste

cosh(-1/0) = +INFINITY                    will not paste
cosh(-1.234566677889e2375)= +INFINITY     invalid input for function
cosh(-7200) = 4.161402346759365E+3126     4.1614023467593632561951834091827e+3126
cosh(-5) =  74.20994852478784             74.209948524787844444106108044488

-1.0e-6 :e
cosh(-1.0E-6) = 1.0000000000005           1.0000000000005000000000000416667
cosh(0) = 1.0                             1
+1.0e-6 :e
cosh(+1.0E-6) = 1.0000000000005           1.0000000000005000000000000416667

cosh(5) =   74.20994852478784             74.209948524787844444106108044488   
cosh(7200) = 4.161402346759365E+3126      4.1614023467593632561951834091827e+3126
1.234566677889e2375 :e
cosh(1.234566677889e2375) = +INFINITY     invalid input for function
cosh(1/0)= +INFINITY                      will not paste                   

tanh(-1/0) = -1.0                         will not paste
tanh(-1.234566677889e2375)= -1.0          too slow
tanh(-7200) =-1.0                         -1
tanh(-5) = -0.999909204262595             -0.99990920426259513121099044753447 

-1.0e-6 :e
tanh(-1.0E-6) = -9.999999999996327E-0007  -0.0000009999999999996666666666668
tanh(0) = 0                               0   
+1.0e-6 :e
tanh(+1.0E-6) =  9.999999999996327E-0007  0.0000009999999999996666666666668   

tanh(5) =  0.999909204262595              0.99990920426259513121099044753447
tanh(7200) = 1.0                          1 
tanh(1.234566677889e2375) = 1.0           invalid input for function
tanh(1/0)= 1.0                            will not paste

do not know how to calc coth, trying cosh/sinh

coth(-1/0) = -1.0                         will not paste
coth(-1.234566677889e2375)= -1.0          invalid input for function
coth(7200) = -1.0                         1
coth(-5) = -1.000090803982019             -1.0000908039820193755366579205217

-1.0e-6 :e
coth(-1.0E-6) = -1000000.000000367        -1000000.0000003333333333333111111
coth(0) = +INFINITY                       0 
1.0e-6 :e
coth(1.0E-6) =  1000000.000000367         1000000.0000003333333333333111111
 
coth(5) =   1.000090803982019             1.0000908039820193755366579205217
coth(7200) = 1.0                          1
coth(1.234566677889e2375) =1.0            invalid input for function
coth(1/0)= 1.0                            will not paste

do not know how to calc sech, trying 1/cosh

sech(-1/0) = 0                            will not paste     
sech(-1.234566677889e2375)= 0             invalid input for functon
sech(-7200) = 0                           2.4030360841670037099489877684017e-3127 
sech(-5) = 0.013475282221305              0.013476505830589086655381881284338

-1.0e-6 :e
sech(-1.0E-6) =  0.9999999999995          0.99999999999950000000000020833333
sech(0) = 1.0                             1
+1.0e-6 :e
sech(+1.0E-6) =  0.9999999999995          0.99999999999950000000000020833333

sech(5) =  0.013475282221305              0.013475282221304557305519138244882
sech(7200) = 0                            2.4030360841670037099489877684017e-3127
sech(1.234566677889e2375)= 0              invalid input for function
sech(1/0)= 0                              will not paste

do not know how to calc csch, trying 1/sinh

csch(-1/0) = 0                            will not paste 
csch(-1.234566677889e2375)= 0             too slow
csch(-7200) = 0                           -2.4030360841670037099489877684017e-3127
csch(-5) = -0.013476505830589             -0.013476505830589086655381881284338     
-1.0e-6 :e
csch(-1.0E-6) = -999999.9999998673        -999999.99999983333333333335277778
csch(0) = +INFINITY                       cannot divide by zero
1.0e-6 :e
csch( 1.0E-6) =  999999.9999998673        999999.99999983333333333335277778
csch(5) =   0.013476505830589             0.013476505830589086655381881284338
csch(7200) = 0                            2.4030360841670037099489877684017e-3127
csch(1.234566677889e2375)= 0              invalid input for function
csch(1/0)= 0                              will not paste
Well Microsoft, here’s another nice mess you’ve gotten us into.

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The calculator
« Reply #5 on: June 11, 2012, 09:10:41 PM »
Hi Michael,
            Thanks for reply  :t
           
I corrected this:

sinh(-7200) = -4.161402346759365E+3126      «« copy-paste problem
sinh( 7200) =  4.161402346759365E+3126      «« copy-paste problem

sech(-7200) =  2.403036084167004E-3127
sech( 7200) =  2.403036084167004E-3127

coth(0)     = Undefined         This is undefined because it can be
csch(0)     = Undefined         -INFINITY or +INFINITY

It seems all results are correct
meanwhile you gave this result

coth(0)     = +INFINITY                   0
but it seems you want to write
coth(0)     = +INFINITY              cannot divide by zero

One question: the Windows calculator uses Real10 or another code?
              Do you know, Michael ?

        Many thanks

EDIT:
sinh(-1.0E-6) = -0.000001       Windows calculator=-0.000001000000000000166666666666675It seems i need to add a randon number generator to give 18 digits
+15 generated, no one knows if it is correct or not ! :greensml:
« Last Edit: June 12, 2012, 01:11:17 AM by RuiLoureiro »

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The calculator
« Reply #6 on: June 12, 2012, 01:17:10 AM »
Hi all

Hyperbolic inverse functions:

Anyone can confirm this values ?

arcsinh(x)=ln(x+sqrt(x^2+1))
arcsinh(-1/0) = -INFINITY
arcsinh(-1.234566677889e2375) = -5469.543463081824
arcsinh(-7200)  = -9.574983490386623
arcsinh(-5)     = -2.312438341272753
arcsinh(-1.0e-6)= -9.999999999998556E-0007
arcsinh(0)      = 0
arcsinh(1.0e-6) =  9.999999999998556E-0007
arcsinh(5)      = 2.312438341272753
arcsinh(7200)   = 9.574983490386623
arcsinh(1.234566677889e2375)  = 5469.543463081824
arcsinh(1/0)    = +INFINITY

arccosh(x)=ln(x+sqrt(x^2-1))        ; it is defined for x>=1
arccosh(-1/0) = Undefined         
arccosh(-5)   = Undefined
arccosh(0)    = Undefined
arccosh(0.99) = Undefined
arccosh(1)    = 0
arccosh(5)    = 2.292431669561178
arccosh(7200) = 9.574983480741561
arccosh(1.234566677889e2375) =  5469.543463081824
arccosh(1/0)  = +INFINITY

note1: if x is very large, arcsinh(x)=~arccosh(x)

arctanh(x)=2^-1* ln((1+x)/(1-x))    ; it is defined for |x|<1
arctanh(-1/0) = Undefined   
arctanh(-1.234566677889e2375) = Undefined
arctanh(-5)   = Undefined
arctanh(-1)   = -INFINITY

arctanh(-0.1) = -0.100335347731076
arctanh(-0.01)= -0.010000333353335
arctanh(-0.001) = -0.001000000333334
arctanh(0)      = 0
arctanh(0.001)  =  0.001000000333334
arctanh(0.01)=  0.010000333353335
arctanh(0.1) =  0.100335347731076

arctanh(1)    = +INFINITY
arctanh(1/0)  = Undefined

arccoth(x)=2^-1* ln((x+1)/(x-1))    ; it is defined for |x|>1
arccoth(-1/0) = 0         
arccoth(-5)   = -0.202732554054082
arccoth(-1.99)= -0.552661861628048
arccoth(-1)   = -INFINITY

arccoth(-0.99)= Undefined
arccoth(0)    = Undefined
arccoth(0.99) = Undefined

arccoth(1)    = +INFINITY
arccoth(1.99) = 0.552661861628048
arccoth(5)    = 0.202732554054082
arccoth(1/0)  = 0       

arcsech(-1/0) = Undefined           ; it is defined for 0 < x <= 1
arcsech(-5)   = Undefined
arcsech(0)    = Undefined       +INFINITY / -INFINITY

arcsech(1.0E-8)= 19.11382792451231
arcsech(0.001)=  7.600902209541989
arcsech(0.01) =  5.298292365610485
arcsech(0.1)  =  2.993222846126381

arcsech(0.99999)        = 0.00447215458902
arcsech(0.999999999999) = 0.000001414213445
arcsech(1)    =  0

arcsech(5)    = Undefined
arcsech(1/0)  = Undefined

arccsch(-1/0) = 0
arccsch(-1.234566677889e2375)= 0
arccsch(-7200)= -0.000138888888442
arccsch(-5)   = -0.198690110349241
arccsch(-1)   = -0.881373587019543

arccsch(-1.0E-8)= -19.11382792451231
arccsch(0)    = Undefined               +INFINITY / -INFINITY
arccsch(1.0E-8)= 19.11382792451231

arccsch(1)    = 0.881373587019543
arccsch(5)    = 0.198690110349241
arccsch(7200) = 0.000138888888442

arccsch(1.234566677889e2375)= 0
arccsch(1/0)  = 0

MichaelW

  • Global Moderator
  • Member
  • *****
  • Posts: 1209
Re: The calculator
« Reply #7 on: June 12, 2012, 09:04:36 AM »
Hi Rui,

The Windows calculator uses some sort of extended precision that can be very slow for some operations.

Quote
Extended Precision, a feature of Calculator, means that all operations are accurate to at least 32 digits. Calculator also stores rational numbers as fractions to retain accuracy. For example, 1/3 is stored as 1/3, rather than .333. However, errors accumulate during repeated operations on irrational numbers. For example, Calculator will truncate pi to 32 digits, so repeated operations on pi will lose accuracy as the number of operations increases.
Well Microsoft, here’s another nice mess you’ve gotten us into.

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The calculator
« Reply #8 on: June 13, 2012, 03:07:41 AM »
Ok, Michael,
thank you  :t

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The calculator
« Reply #9 on: June 14, 2012, 01:26:42 AM »
Hi all

        **** Here is calcula50 v1.10 ****

            Now, we have 57 functions
           
            Now, the calculator gives results from
                -INFINITY to +INFINITY             
            or
                undefined               e.g. ln(-1), arccos(-2), SIN(1/0)
            or
                "indeterminate form"    e.g. 0/0           
            or
                Operand too long e.g. 4444444444444444445
            or
                ERROR.
           
            Now, the calculator solves all trigonometric functions,
            all inverse trigonometric functions
            all hyperbolic functions
            and all inverse hyperbolic functions.

            functions: atan2(y,x) and atan2d(y,x)

            e.g.    atan2d(24,sqr(3+1)) = 85.23635830927382
                    1+atan2d(24,sqr(-3+1)) = Undefined because sqr(-3+1) is Undefined

        If you want to give any suggestion
        please, answer this post
       
        Try it and say something.
        Good luck !

        Thanks       
        Rui Loureiro

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The calculator
« Reply #10 on: June 30, 2012, 05:42:44 AM »
        **** Here is calcula51 v1.11 ****

        I made some corrections in Calcula50

        calcula51 has a new look

        Good luck
        Rui Loureiro

Farabi

  • Member
  • ****
  • Posts: 970
  • Neuroscience Fans
Re: The calculator
« Reply #11 on: June 30, 2012, 02:05:29 PM »
Whoa, cool man, can I use it on my project?  :t
http://farabidatacenter.url.ph/MySoftware/
My 3D Game Engine Demo.

Contact me at Whatsapp: 6283818314165

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The calculator
« Reply #12 on: June 30, 2012, 07:42:20 PM »
Whoa, cool man, can I use it on my project?  :t
               Yes, Farabi, where you want no problems  :t
               If you know some erros, please tell me
               i correct it

RuiLoureiro

  • Member
  • ****
  • Posts: 671
Re: The calculator
« Reply #13 on: June 11, 2013, 07:26:02 AM »
Hi all

***** Here is The calculator v2.20 *****

In this version we have:

1. conversions decimal-hexadecimal-binary

    note:  -  => two's complement

    type: -12d      (decimal end with "d" or "D")

    we get:     unsigned: 18446744073709551604 / signed: -12
                         
                FFFFFFFFFFFFFFF4H
                11111111111111111111111111111111
                11111111111111111111111111110100B

    type: 18446744073709551604d

    we get:     18446744073709551604d
   
                FFFFFFFFFFFFFFF4H
                11111111111111111111111111111111   
                11111111111111111111111111110100B


    type:   FFFFFFFFFFFFFFF4H

    we get:     unsigned: 18446744073709551604 / signed: -12
                         
                FFFFFFFFFFFFFFF4H
                11111111111111111111111111111111
                11111111111111111111111111110100B


    type:   FFFFFFFFFFFFFFFFH

    we get:     unsigned: 18446744073709551615 / signed: -1
                FFFFFFFFFFFFFFFFH
                11111111111111111111111111111111
                11111111111111111111111111111111B               


    type:   7FFF FFFF FFFF FFFFh

    we get:     9223372036854775807

                7FFFFFFFFFFFFFFFh
                01111111111111111111111111111111
                11111111111111111111111111111111B
               
    type:   9223372036854775807d   
       
    we get:     9223372036854775807d       
                7FFFFFFFFFFFFFFFH
                01111111111111111111111111111111
                11111111111111111111111111111111B


2. logic expressions

    first: shl and shr
    next:  or, and, xor (or = +)
   
    -   :  invert
   
    type:   21h shl 2d + 34h and -56h shl 3d and 99h xor 12h

    we get:     18
                00000012H
                00000000000000000000000000010010B
   
    type:   -(21h shl 2d) + 34h and -56h shl 3d and 99h xor 12h

    we get:     26
                0000001AH
                00000000000000000000000000011010B

    type:   -(21h shl 2d + (34h and -56h) shl 3d and 99h xor 12h)

    we get:     unsigned: 18446744073709551469 / signed: -147
                FFFFFFFFFFFFFF6DH
                11111111111111111111111111111111
                11111111111111111111111101101101B

Now i need to do some more tests
but it seems it works correctly
Rui Loureiro
« Last Edit: June 13, 2013, 01:53:58 AM by RuiLoureiro »

dedndave

  • Member
  • *****
  • Posts: 8734
  • Still using Abacus 2.0
    • DednDave
Re: The calculator
« Reply #14 on: June 11, 2013, 09:49:21 AM »
nice, Rui   :t