Change name for →Qπ - please suggest!
|
11-16-2017, 09:18 PM
Post: #21
|
|||
|
|||
RE: Change name for →Qπ - please suggest! | |||
11-16-2017, 09:24 PM
Post: #22
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
FP_RAT() in capital letters indicating a home function could be an acceptable choice, second best, when RATAPPROX is too long, I have the impression, that I very often select functions from the menus, so length doesn't matter, and when I write a program I prefer short names, so 3 letters can be hit by an arbitrary name given to some subroutine.
Arno |
|||
11-16-2017, 11:18 PM
(This post was last modified: 11-16-2017 11:19 PM by primer.)
Post: #23
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
(11-16-2017 05:50 PM)salvomic Wrote: • rational_form (11-16-2017 06:45 PM)DrD Wrote: Since it involves changing a floating point to rational number.... Sorry, but sqrt(2) is not rational, but is irratonal no ? So every name with "rational" only shoud be avoided. maybe normalize(), but I don't like it too much myself or toALG() ? primer |
|||
11-17-2017, 12:02 AM
Post: #24
|
|||
|
|||
RE: Change name for →Qπ - please suggest! | |||
11-17-2017, 12:06 AM
(This post was last modified: 11-17-2017 08:08 AM by StephenG1CMZ.)
Post: #25
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
What would a novice think QPI(4.5) means if they saw it in the source code and hadn't previously read this thread?
PPL supports implied multiplication, yes? So QPI(4.5) can be parsed as QPI*(bracketed-expression), yes? I haven't looked it up yet, but I might guess its a constant equal to QuarterPi, or Pi/4, multiplied by 4.5. (For comparison: many algorithms use the constant TwoPi = 2*Pi to avoid the cost of a multiply). So let's forget the reference to Pi, at least, which it has nothing to do with. To be consistent with other HP Prime conversion names, such as mat2list, something like fp2exact seems reasonable for now. However, the "fp" part bothers me. Why? What would you expect fp2exact(#2) to do? Or fp2exact(2.1+2.2i) The intuitive result of giving it a complex number seems obvious enough: 21/10 + (22/10)i or something (I haven't checked exactly what the output should be, but I guess it should be complex) So do we need Complex2exact String2exact etc.? Perhaps just Convert2exact(anything), or ToEXACT for brevity, But then for consistency mat2list ought to be Convert2list or Tolist etc. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
11-17-2017, 12:09 AM
Post: #26
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
(11-17-2017 12:02 AM)Voldemar Wrote: Rational under square root. This command is related to rational.Yes "related", but result isn't rational. And I found weird to call that function something like to_rat() or fp_rat() which doesnt return a rational result. primer |
|||
11-17-2017, 12:22 AM
(This post was last modified: 11-17-2017 12:25 AM by AlexFekken.)
Post: #27
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
(11-16-2017 07:39 PM)DrD Wrote: Since any number can be divided by 1, they are all rational numbers. Am I missing something or is this is a suggestion to redefine "rational number" to mean "any number"? Suggesting that square roots, multiples of pi etc should be called "rational numbers" in general seems pretty silly to me. And baking it into function name extremely misleading. EDIT: oops this was picked up already... |
|||
11-17-2017, 12:28 AM
Post: #28
|
|||
|
|||
RE: Change name for →Qπ - please suggest! | |||
11-17-2017, 12:39 AM
Post: #29
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
How about «show rational part»?
SRP |
|||
11-17-2017, 12:52 AM
Post: #30
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
I don't know what is meaning of QPI output. Is it only visualition or it is something which can be stored into variable (or variables as there are p and q) for example?
If it is the former, then it is similar to [a b/c] key and it could be on almost empty menu bar (where is nothing more than Sto >) as f(p/q) or something. I'm sorry if I'm talking nonsense. Prime G2, 15C CE |
|||
11-17-2017, 02:31 AM
Post: #31
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
RATCOMP
Rational Composition -- all the results are essentially the composition of ->Q(X) with one of the following functions: 1(X) (identity), SQRT(X), EXP(X), LN(X), or PI(X) (multiplication by PI). For a shorter name: QFORM Q for rational, and FORM because the program converts the numerical value into some form involving a rational value. Or perhaps RATFORM If not QPI, then I would lean in favor of RATCOMP Graph 3D | QPI | SolveSys |
|||
11-17-2017, 06:25 AM
Post: #32
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
Assuming that it finds the nearest approximation, perhaps something like QNEARF, or possibly just NEAR?
|
|||
11-17-2017, 10:41 AM
Post: #33
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
if it's going to be built-in some day, it would be logical to assign it to the a b/c button in certain contexts. Currently, this is the approx and when you hit it again, it does the opposite = exact.
So, if you do exact(0.428571428571) it gives you 3/7 currently. Hey, I just realized that QPI seems to be a more advanced exact() command. Maybe we should just replace exact with the functionality in the QPI command. I added the qpif command suggested in Han's original post....wondering if maybe that's the version that gets called in CAS mode and the regular QPI gets called in Home mode. |
|||
11-17-2017, 01:33 PM
(This post was last modified: 11-17-2017 01:34 PM by Eddie W. Shore.)
Post: #34
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
I like QPI (for consistency with the HP 48/49/50G family) or RAT (rationalize).
|
|||
11-17-2017, 01:35 PM
Post: #35
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
(11-17-2017 01:33 PM)Eddie W. Shore Wrote: I like QPI or RAT (rationalize). QPI (as the Han's version) is ok, and also RAT, yeah. However, if the problem is only the -> (in CAS I think) also Qπ could be ok... ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
11-17-2017, 03:21 PM
(This post was last modified: 11-19-2017 09:54 AM by compsystems.)
Post: #36
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
The name must encompass a meaningful name for some functions that it performs
QPIRLNe: convert decimal to ℚ(p/q) or p/q*PI or SQRoot(p/q) or LN(p/q) or e^(p/q) qpi_approx(); qpi_asqrtb(); qpi_out(); qpi_outsqrt(); qpi_real(); qpi_complex(); qpi_list(); qpi_root(); qpi_pi(); qpi_ln(); qpi_exp(); qpi_symb(); By tradition is QPI (hp48/50) but it does not report everything it can do, I propose QPIRLNe name from Q Quotient (fraction p/q) + or PI+ or ROOT+ or LN+ or e Who else agrees with QPIRLNe? PHP Code: // QPI by Han Duong |
|||
11-17-2017, 03:36 PM
Post: #37
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
To Tim's point,
An unaware student, seeking an exact representation of these numbers might not quickly think of QPI as an applicable command name for this purpose. As a command name, QPI doesn't convey its purpose very well. Command names that have some essence of their purpose have search advantages, and are more intuitive when encountered in programs. QPI could be part of the help description for historical context, but as a command name, it's not the best. |
|||
11-17-2017, 03:43 PM
Post: #38
|
|||
|
|||
RE: Change name for →Qπ - please suggest! | |||
11-17-2017, 03:50 PM
Post: #39
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
(11-17-2017 03:43 PM)Didier Lachieze Wrote:(11-17-2017 03:36 PM)DrD Wrote: An unaware student, seeking an exact representation of these numbers might not quickly think of QPI as an applicable command name for this purpose. exact() currently already exists as a command. Moreover, it only converts to fractional form, unless I am mistaken. If we wish to use EXACT, (all uppercase, to be treated differently from all lowercase exact()) then it could work. However, there are many forms that will not be handled by QPI (at least not currently): SIN(2), 2+SQRT(3), 1/PI, etc. So EXACT seems to be overreaching as far as names go. Graph 3D | QPI | SolveSys |
|||
11-17-2017, 03:55 PM
(This post was last modified: 11-17-2017 04:00 PM by salvomic.)
Post: #40
|
|||
|
|||
RE: Change name for →Qπ - please suggest!
try with 2.30258509299 as result of approx(LN(10))
exact(2.30258509299) returns (bot Home and CAS) 1944167/844341 QPI(2.30258509299) and ->Qπ(2.30258509299) return LN(10). Note: QPI both in Home and CAS, ->Qπ for now only in Home. Onestly, I prefer the output of QPI, and I think we could keep both commands separated and for different goals... However, maybe also a (all caps) EXACT() could be a good idea. ∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 6 Guest(s)