Post Reply 
Change name for →Qπ - please suggest!
11-16-2017, 05:42 PM
Post: #1
Change name for →Qπ - please suggest!
So its been pointed out that the → in the name causes problems with calling the function in the CAS screen since → is an operator used there.

I personally have never particularly liked the name since I first came across it in the 49G. Seemed rather cryptic and while it was quick to type, maybe the time has come to change the name to something else.

The original QPI 4.3 docs stated:

Quote:Original written by Mika Heiskanen, now maintained by Andre Schoorl. Based on QPirac by A.Coulom and MuPAD rationalize command.

QPI approximates any floating point numbers by a rational number, square
root, multiple of PI, exponential or a logarithm depending on which
approximation seems best.

I'm hoping that between all of us we might be able to come up with a better name that isn't quite as cryptic, but not also something ridiculously long.

Any ideas or suggestions?

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
11-16-2017, 05:50 PM
Post: #2
RE: Change name for →Qπ - please suggest!
Something simple:

• toQ
• Qform
• rational_form
• QP

∫aL√0mic (IT9CLU), HP Prime, 50g, 41CX, 42s, 15C, 12C, DM42 :: Prime Soft. Lib
Find all posts by this user
Quote this message in a reply
11-16-2017, 05:53 PM
Post: #3
RE: Change name for →Qπ - please suggest!
Why not QPI? Or qpi?
Find all posts by this user
Quote this message in a reply
11-16-2017, 06:23 PM (This post was last modified: 11-16-2017 06:23 PM by Tim Wessman.)
Post: #4
RE: Change name for →Qπ - please suggest!
And what does QPI mean and why would one have any clue what it meant was happening upon finding it in a catalog?

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
11-16-2017, 06:37 PM
Post: #5
RE: Change name for →Qπ - please suggest!
My guess is q stands for the rationals, and pi serves as a placeholder for other recognizable constants like multiples of pi, ln of 2, etc.
Find all posts by this user
Quote this message in a reply
11-16-2017, 06:45 PM
Post: #6
RE: Change name for →Qπ - please suggest!
Since it involves changing a floating point to rational number why not use something like:

fp2rat()

-Dale-
Find all posts by this user
Quote this message in a reply
11-16-2017, 06:57 PM
Post: #7
RE: Change name for →Qπ - please suggest!
fp2rat() seams reasonable, but I would prefer something like ratapprox(), the name clarifies that it is only an approximation by rationals.
Arno
Find all posts by this user
Quote this message in a reply
11-16-2017, 06:57 PM
Post: #8
RE: Change name for →Qπ - please suggest!
Not bad!
Find all posts by this user
Quote this message in a reply
11-16-2017, 07:02 PM (This post was last modified: 11-16-2017 07:10 PM by ggauny@live.fr.)
Post: #9
RE: Change name for →Qπ - please suggest!
Hi,

QPI, we all know the program of Han and we used *QPI* as name.

Gérard.
Find all posts by this user
Quote this message in a reply
11-16-2017, 07:19 PM
Post: #10
RE: Change name for →Qπ - please suggest!
(11-16-2017 06:57 PM)Arno K Wrote:  fp2rat() seams reasonable, but I would prefer something like ratapprox(), the name clarifies that it is only an approximation by rationals.
Arno

ratapprox() seems too long for a command name. Imagine a program sentence including ratapprox() as one of the terms, for example.
Find all posts by this user
Quote this message in a reply
11-16-2017, 07:26 PM
Post: #11
RE: Change name for →Qπ - please suggest!
Prime currently uses approx to return a floating point approximation in CAS, so that could get wrongway confusing.

FP for floating point seems to cover the inputs - both real or complex. And qpi returns more than just rational numbers so 'rat' may be too specific and limiting.

Maybe something like:
fp2exact or fp2e

... although, it's really an "approximately exact" value...
Find all posts by this user
Quote this message in a reply
11-16-2017, 07:34 PM
Post: #12
RE: Change name for →Qπ - please suggest!
(11-16-2017 06:37 PM)Helge Gabert Wrote:  My guess is q stands for the rationals, and pi serves as a placeholder for other recognizable constants like multiples of pi, ln of 2, etc.

Yes. QPI is just QPirac shortened. I particularly like QPI since it is easy to type (no special symbols, only 3 letters). Q is fairly standard for rationals, and PI is also fairly commonly used for... well, pi (in most languages).

fp2rat makes sense if you speak English and realize that 2 and "to" sound the same. Otherwise it makes no sense to have 2 in the middle (try to view this from a non-English speaker's point of view). The same could be said for the abbreviation itself. Granted, this latter point is usually a non-issue since most programming languages use English dictionaries.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
11-16-2017, 07:39 PM
Post: #13
RE: Change name for →Qπ - please suggest!
Well, when you read the description of QPI, it is described:

Quote:HP Prime port of QPI 4.3 (originally for the HP 48 series). Approximates any floating point numbers by a rational number, square root, multiple of PI, exponential or a logarithm depending on which approximation seems best.
By Han Duong (HPSolo) and Mika Heiskanen.

Since any number can be divided by 1, they are all rational numbers. If you don't care for:

fp2rat(); <== pretty self explanatory

how about:

fp2a(); <== a little vague
fp2apr(); <== too long
Find all posts by this user
Quote this message in a reply
11-16-2017, 08:06 PM
Post: #14
RE: Change name for →Qπ - please suggest!
Personally, I don't like the 2/to thing, but it's everywhere - even in Prime/CAS already.

Rat/1: ok. :-)
Find all posts by this user
Quote this message in a reply
11-16-2017, 08:22 PM (This post was last modified: 11-16-2017 08:23 PM by Helge Gabert.)
Post: #15
RE: Change name for →Qπ - please suggest!
Yes, qpi returns an exact representation of a rational/irrational/transcendental, so on second thought, I agree with fp2e.

Or just leave it as qpi - - it's been around since the days of the 48gx as an add-on program.
Find all posts by this user
Quote this message in a reply
11-16-2017, 08:40 PM (This post was last modified: 11-16-2017 08:45 PM by Didier Lachieze.)
Post: #16
RE: Change name for →Qπ - please suggest!
My first choice would be QPI.

As a second choice, as it is a HOME function and as we have already the CAS function exact(), I would suggest EXACT().

Whatever the final name it should be in Upper Case to follow the
Prime naming convention for Home functions.

Btw, I find fp2rat() pretty ugly...
Find all posts by this user
Quote this message in a reply
11-16-2017, 08:41 PM
Post: #17
RE: Change name for →Qπ - please suggest!
A little input from somebody (~me) who never used QPI function.

Every suggestion posted here looks to me more cryptic than original QPI name.

But if you really don't like QPI, what about QREP as abbreviation for rational representation?

Geocaching Coords Solver, Number of triangles Puzzle
Find all posts by this user
Quote this message in a reply
11-16-2017, 09:04 PM
Post: #18
RE: Change name for →Qπ - please suggest!
  • QRπ
  • QPI

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
11-16-2017, 09:13 PM
Post: #19
RE: Change name for →Qπ - please suggest!
(11-16-2017 08:40 PM)Didier Lachieze Wrote:  My first choice would be QPI.

As a second choice, as it is a HOME function and as we have already the CAS function exact(), I would suggest EXACT().

Whatever the final name it should be in Upper Case to follow the
Prime naming convention for Home functions.

Btw, I find fp2rat() pretty ugly...

I agree also. However, Tim said he didn't like QPI, because it is too cryptic. So, How about

FP_RAT()

If that isn't too cheesy.
Find all posts by this user
Quote this message in a reply
11-16-2017, 09:16 PM
Post: #20
RE: Change name for →Qπ - please suggest!
I'm not personally against anything - was just sharing my thinking. It never particularly made sense to me when I was starting on the 49...

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)