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?

Something simple:

• toQ

• Qform

• rational_form

• QP

And what does QPI mean and why would one have any clue what it meant was happening upon finding it in a catalog?

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.

Since it involves changing a floating point to rational number why not use something like:

fp2rat()

-Dale-

fp2rat() seams reasonable, but I would prefer something like ratapprox(), the name clarifies that it is only an approximation by rationals.

Arno

Hi,

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

(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.

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...

(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.

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

Personally, I don't like the 2/to thing, but it's everywhere - even in Prime/CAS already.

Rat/1: ok. :-)

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.

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...

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?

(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.

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...