Menu

#803 extensions to complex.cls

5.0.0
accepted
Erich
complex (1)
tests
1
2022-06-03
2022-06-02
Walter
No

I have extended the complex,cls with two methods:
sqrt computing the suare root
** computing a power of a complex number
Any interest to add this for R5 etc. ???

2 Attachments

Discussion

  • Erich

    Erich - 2022-06-02
    • summary: extensions to comples.cls --> extensions to complex.cls
    • status: unread --> accepted
    • assigned_to: Erich
    • Pending work items: none --> tests
    • Milestone: None --> 5.0.0
     
  • Erich

    Erich - 2022-06-02

    added sqrt and exponentiation with revision [r12427]

     

    Related

    Commit: [r12427]

  • Anonymous

    Anonymous - 2022-06-02

    From Jochem Peelen:
    Sorry for nitpicking, but after the two methods inserted by Walter, there is now a comment token "--" in the old code missing.
    The 5th line (not counting blank lines) after his new code is a comment ending in a comma.
    The 6th line started:
    "-- so it uses ..."
    now it is:
    "so it uses ..."
    (The same situation exists in RXM.CLS on Rosettacode.org, in method power. I refrained to report it, because after reporting a block of dead code in RXM.CLS , the reaction was negative.)

     
  • Walter

    Walter - 2022-06-02

    Thanks for accepting & caring
    I can't find what the problem is. And where on rosettacode?

     
  • Walter

    Walter - 2022-06-02

    I just noticed that IÄve keft 2 Say instructions in complex.cls :-(
    Attached the corrected code now,

     
  • Anonymous

    Anonymous - 2022-06-03

    From Jochem Peelen:
    Walter, I was referring to the following locations in RXM.CLS (in rosettacode task named trigonometric functions):
    in ::Method LN2
    The first 6 lines start defining variable "V", but the definition of V is restarted in line 7.

    In ::Method Power
    Line 17 down from the ::Method directive is a comment line starting with "--". It ends in a comma.
    Line 18 seems to be intended as a continuation.
    The current, new rosettacode web page highlights line 17 gray and line 18 red.

    I was very happy when I discovered the existence of RXM.CLS, because in special cases I need more than precision 16. It has helped me a lot over time. Your ooRexx class complex.cls has the same potential in my view.

     
  • Walter

    Walter - 2022-06-03

    Jochen, thanks. I corrected both glitches on rosettacode
    btw. complex.cls is not "mine". I addes only two methosd.

     

Anonymous
Anonymous

Add attachments
Cancel