Sharp PC-1500A Compiler
|
Yesterday, 03:09 AM
Post: #10
|
|||
|
|||
RE: Sharp PC-1500A Compiler
(12-02-2024 11:49 PM)toml_12953 Wrote: It chokes on the Python function sqrt! Calculators have a square root function, no? Python doesn't provide a sqrt function. It has to be imported from a library. From Help & User Guide: Quote:What is not supported From List of HP42S Commands Reference: \( \begin{array}{|c|c|} \hline \text{HP42S Command} & \text{Supported in Python to RPN} & \text{Comments Parameters} & \text{Description (original HP42S)} \\ \hline \text{SQRT} & \text{✓} & \text{(n)} & \text{Square root. Returns √x.} \\ \hline \end{array} \) The following Python program works: Code: def radius(x, y): The generated code for the HP-42S can be optimized to: Code: LBL "radius" You could also use the built-in function →POL instead: Code: r, phi = toPol(x, y) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Sharp PC-1500A Compiler - Josef - 11-21-2024, 06:05 AM
RE: Sharp PC-1500A Compiler - Jeff_Birt - 11-21-2024, 03:34 PM
RE: Sharp PC-1500A Compiler - Josef - 11-22-2024, 05:49 AM
RE: Sharp PC-1500A Compiler - Josef - 11-27-2024, 08:25 PM
RE: Sharp PC-1500A Compiler - Josef - 11-30-2024, 06:31 PM
RE: Sharp PC-1500A Compiler - Josef - Yesterday, 07:45 PM
RE: Sharp PC-1500A Compiler - Josef - 12-01-2024, 12:32 PM
RE: Sharp PC-1500A Compiler - Thomas Klemm - 12-02-2024, 08:41 PM
RE: Sharp PC-1500A Compiler - toml_12953 - 12-02-2024, 11:49 PM
RE: Sharp PC-1500A Compiler - Josef - 12-02-2024, 10:35 PM
RE: Sharp PC-1500A Compiler - Thomas Klemm - Yesterday 03:09 AM
RE: Sharp PC-1500A Compiler - toml_12953 - Yesterday, 03:41 AM
RE: Sharp PC-1500A Compiler - Thomas Klemm - Yesterday, 04:55 AM
RE: Sharp PC-1500A Compiler - Josef - Yesterday, 08:00 PM
RE: Sharp PC-1500A Compiler - Josef - Today, 06:57 AM
|
User(s) browsing this thread: 1 Guest(s)