Saluton!
Implementing some additional mathematical functions I came across
acosh, asinh, and atanh. Here the Principle of Least Surprise runs
into a severe problem.
On the one hand it is not that uncommon to use these names. On the
other hand mathematicians prefer to call them arcosh, arsinh and
atanh.
What about allowing for both names in later versions of Ruby?
Several names for one method are not that uncommon in Ruby. For a
hash h the follwing methods are identical:
h.key?
h.has_key?
h.include?
h.member?
Gis,
Josef ‘Jupp’ Schugt
···
–
N’attribuez jamais à la malice ce que l’incompétence explique !
– Napoléon
I personally have always seen the use of acosh, asinh, and atanh in
software libraries. It should be quite trivial to just alias the longer
names.
···
On Thu, 2003-08-21 at 17:44, Josef ‘Jupp’ Schugt wrote:
Saluton!
Implementing some additional mathematical functions I came across
acosh, asinh, and atanh. Here the Principle of Least Surprise runs
into a severe problem.
On the one hand it is not that uncommon to use these names. On the
other hand mathematicians prefer to call them arcosh, arsinh and
atanh.
What about allowing for both names in later versions of Ruby?
Several names for one method are not that uncommon in Ruby. For a
hash h the follwing methods are identical:
h.key?
h.has_key?
h.include?
h.member?
Gis,
Josef ‘Jupp’ Schugt
Hi,
Implementing some additional mathematical functions I came across
acosh, asinh, and atanh. Here the Principle of Least Surprise runs
into a severe problem.
Ah, please stop mentioning POLS whenever your personal expectation is
not satisfied. I’m sick of them.
On the one hand it is not that uncommon to use these names. On the
other hand mathematicians prefer to call them arcosh, arsinh and
atanh.
What about allowing for both names in later versions of Ruby?
Those names show Ruby’s respect to the UNIX heritage. If you want to
have alias to those functions, submit request with reasons that they
are worth adding lines in the reference manual.
matz.
···
In message “POLS and names of mathematical functions” on 03/08/22, “Josef ‘Jupp’ Schugt” jupp@gmx.de writes:
Scripsit ille »Josef ‘Jupp’ Schugt« jupp@gmx.de:
Saluton!
Implementing some additional mathematical functions I came across
acosh, asinh, and atanh. Here the Principle of Least Surprise runs
into a severe problem.
On the one hand it is not that uncommon to use these names. On the
other hand mathematicians prefer to call them arcosh, arsinh and
atanh.
Here (Frankfurt) they’re called arcosh or arccosh (I saw both), arcsinh
and arctanh. But it may depend on the professor.
What about allowing for both names in later versions of Ruby?
Now there are three names.
···
–
[11] “My Last Theorem: A Prankster’s Guide to Ageless Mathematical
Jokes That are Funny Because They’re True and People Can’t Prove
Them for Centuries.” P. Fermat. Circa 1630.
RFC 2795
Saluton!
- Yukihiro Matsumoto; 2003-08-22, 12:12 UTC:
Implementing some additional mathematical functions I came across
acosh, asinh, and atanh. Here the Principle of Least Surprise runs
into a severe problem.
Ah, please stop mentioning POLS whenever your personal expectation
is not satisfied. I’m sick of them.
You possibly misunderstood me. The function names are not
unexpected to me. arcosh and the like would not be unexpected to me,
either. I was wondering how you did resolve the question which name
to actually use.
Those names show Ruby’s respect to the UNIX heritage.
This answers the question how to apply the POLS in this case. I was
aware that Ruby has a UNIX heritage but I did not know that
respecting the UNIX heritage is a design principle Ruby targets at.
Given that it makes no sense to use names for inverse hyperbolic
functions than are different from those used by UNIX. Taking a look
at the local atanh man page I also found out that the names used are
POSIX and ISO 9899 compliant.
Thank you for making me learn something about mathematical functions
under UNIX I didn’t know before.
Josef ‘Jupp’ Schugt
Implementing some additional mathematical functions I came across
acosh, asinh, and atanh. Here the Principle of Least Surprise runs
into a severe problem.
On the one hand it is not that uncommon to use these names. On the
other hand mathematicians prefer to call them arcosh, arsinh and
atanh.
Here (Frankfurt) they’re called arcosh or arccosh (I saw both), arcsinh
and arctanh. But it may depend on the professor.
As a mathematecian, I see no problem at all with atanh, asinh, etc.
Anyone who has used a scientific calculator will be familiar with the
shorter forms.
···
–
Daniel Carrera, Math PhD student at UMD. PGP KeyID: 9AF77A88
.-“~~~”-.
/ O O \ ATTENTION ALL PASCAL USERS:
: s :
\ _/ / To commemorate the anniversary of Blaise Pascal’s
`-._.-’ birth (today) all your programs will run at hals speed.
Saluton!
- Rudolf Polzer; 2003-08-24, 14:46 UTC:
Here (Frankfurt) they’re called arcosh or arccosh (I saw both),
arcsinh and arctanh. But it may depend on the professor.
‘arccosh’ and ‘arcsinh’ are nothing but mistakes.
arcsin x is a short for ‘arc who’s sinus is x’.
arsinh x is short for ‘area who’s sinus hyperbolicus is x’
(Precisely taken they are short for the latin equivalents).
arcsinh x would mean ‘arc who’s hyperbolic sinus is x’ - which is
nonesense.
Now there are three names.
Of which only two are correct.
Gis,
Josef ‘Jupp’ Schugt
···
–
LICENSE AGREEMENT: By adding my mail address to your Outlook or
Outlook Express address book you accept paying me 10 EUR for each
message containing malware that I receive from you.
Scripsit ille »Daniel Carrera« dcarrera@math.umd.edu:
Implementing some additional mathematical functions I came across
acosh, asinh, and atanh. Here the Principle of Least Surprise runs
into a severe problem.
On the one hand it is not that uncommon to use these names. On the
other hand mathematicians prefer to call them arcosh, arsinh and
atanh.
Here (Frankfurt) they’re called arcosh or arccosh (I saw both), arcsinh
and arctanh. But it may depend on the professor.
As a mathematecian, I see no problem at all with atanh, asinh, etc.
Anyone who has used a scientific calculator will be familiar with the
shorter forms.
No, they use sin^-1 etc.
SCNR
But I think it’s enough to have ONE form for them - one can get used to
it. BASIC for example uses ATN for the arcus tangent. One can even get
used to THAT. And “just put an a in front of the name” is a clear rule.
···
–
“Windows löschen” fällt m.E. unter die bestimmungsgemässe Nutzung der
Software. Also zulässig. [Holger Lembke in de.soc.recht.marken+urheber]
Scripsit ille »Josef ‘Jupp’ Schugt« jupp@gmx.de:
Saluton!
- Rudolf Polzer; 2003-08-24, 14:46 UTC:
Here (Frankfurt) they’re called arcosh or arccosh (I saw both),
arcsinh and arctanh. But it may depend on the professor.
‘arccosh’ and ‘arcsinh’ are nothing but mistakes.
They must be very common ones… especially “arcus tangens hyperbolicus”
is a widely used term. I know that arcus comes from arc and tan and tanh
have almost nothing in common unless in C, but these expressions are
usual.
···
–
About hexadecimal values
Wipe Info uses hexadecimal values to wipe files. This provides
more security than wiping with decimal values.
Saluton!
- Yukihiro Matsumoto; 2003-08-23, 14:32 UTC:
You possibly misunderstood me.
I did.
I just wanted you not to mention POLS when you ask/propose
something, because it’s based on your personal background.
What about making this explicit in the comp.lang.ruby FAQ’s posting
guidelines section? Opinions about that?
Gis,
Josef ‘Jupp’ Schugt
···
–
LICENSE AGREEMENT: By adding my mail address to your Outlook or
Outlook Express address book you accept paying me 10 EUR for each
message containing malware that I receive from you.
As a mathematecian, I see no problem at all with atanh, asinh, etc.
Anyone who has used a scientific calculator will be familiar with the
shorter forms.
No, they use sin^-1 etc.
I’ve seen both in scientific claculators. I didn’t mention sin^-1 because
that’s not in the discussion.
What do Maple and Mathematica use? I can’t remember, I haven’t used those
in years. Perhaps that’s who Ruby should be copying.
But I think it’s enough to have ONE form for them - one can get used to
it.
I think one is enough. Just figure out which is least surprising.
BASIC for example uses ATN for the arcus tangent. One can even get
used to THAT. And “just put an a in front of the name” is a clear rule.
Well… I find ATN very surprising for arctan.
···
On Mon, Aug 25, 2003 at 02:42:37AM +0900, Rudolf Polzer wrote:
–
Daniel Carrera, Math PhD student at UMD. PGP KeyID: 9AF77A88
.-“~~~”-.
/ O O \ ATTENTION ALL PASCAL USERS:
: s :
\ _/ / To commemorate the anniversary of Blaise Pascal’s
`-._.-’ birth (today) all your programs will run at hals speed.
Scripsit ille »Daniel Carrera« dcarrera@math.umd.edu:
As a mathematecian, I see no problem at all with atanh, asinh, etc.
Anyone who has used a scientific calculator will be familiar with the
shorter forms.
No, they use sin^-1 etc.
I’ve seen both in scientific claculators. I didn’t mention sin^-1 because
that’s not in the discussion.
What do Maple and Mathematica use? I can’t remember, I haven’t used those
in years. Perhaps that’s who Ruby should be copying.
The computer algebra system “maxima” uses the a-prefix method. BTW, it
also supports cot, acot, coth and acoth. Maple always uses the arc-prefix
and always has the cot family of functions.
But I think it’s enough to have ONE form for them - one can get used to
it.
I think one is enough. Just figure out which is least surprising.
The one which is already there.
rpolzer@katsuragi ~ $ irb
irb(main):001:0> Math.atan(17)
=> 1.51204050407917
irb(main):002:0> Math.atanh(17)
Errno::EDOM: Numerical argument out of domain - atanh
from (irb):2:in `atanh’
from (irb):2
Until now tan and tanh don’t have much in common, mathematically.
But this makes them nearly the same functions:
irb(main):003:0> require ‘complex’
=> true
irb(main):004:0> Math.atanh(17)
=> Complex(0.0588915178281917, 1.5707963267949)
irb(main):005:0> Math.atanh(17 * Complex::I)
=> Complex(0.0, 1.51204050407917)
That makes it obvious that it would be good to use the same prefix for
the inverse functions.
···
On Mon, Aug 25, 2003 at 02:42:37AM +0900, Rudolf Polzer wrote:
–
Is there any documentation of the O() notation for Array operations.
The source.
It answers everything (including bugs), except for
“why” part.
[Yukihiro Matsumoto (“Matz”) in comp.lang.ruby]
Saluton!
- Rudolf Polzer; 2003-08-25, 12:41 UTC:
Until now tan and tanh don’t have much in common, mathematically.
But this makes them nearly the same functions:
irb(main):003:0> require ‘complex’
=> true
irb(main):004:0> Math.atanh(17)
=> Complex(0.0588915178281917, 1.5707963267949)
irb(main):005:0> Math.atanh(17 * Complex::I)
=> Complex(0.0, 1.51204050407917)
That makes it obvious that it would be good to use the same prefix
for the inverse functions.
You mean that
sin(Complex::I * x) = Complex::I * sinh(x)
sinh(Complex::I * x) = Complex::I * sin(x)
cos(Complex::I * x) = cosh(x)
cosh(Complex::I * x) = cos(x)
explains why to use the symbols asin, asinh, acos, and acosh? Well,
that’s quite obvious if one expresses trigonometric and hyperbolic
functions in terms of complex exponential functions:
sinh(x) = (exp(x) - exp(-x)) / 2
and
sin(x) = (exp(ix) - exp(-ix)) / 2i
If you apply sinh on ix the result obviously is i times that of
sin(x).
Gis,
Josef ‘Jupp’ Schugt
···
–
LICENSE AGREEMENT: By adding my mail address to your Outlook or
Outlook Express address book you accept paying me 10 EUR for each
message containing malware that I receive from you.
Scripsit illa aut ille »Josef ‘Jupp’ Schugt« jupp@gmx.de:
- Rudolf Polzer; 2003-08-25, 12:41 UTC:
Until now tan and tanh don’t have much in common, mathematically.
But this makes them nearly the same functions:
irb(main):003:0> require ‘complex’
=> true
irb(main):004:0> Math.atanh(17)
=> Complex(0.0588915178281917, 1.5707963267949)
irb(main):005:0> Math.atanh(17 * Complex::I)
=> Complex(0.0, 1.51204050407917)
That makes it obvious that it would be good to use the same prefix
for the inverse functions.
You mean that
sin(Complex::I * x) = Complex::I * sinh(x)
sinh(Complex::I * x) = Complex::I * sin(x)
cos(Complex::I * x) = cosh(x)
cosh(Complex::I * x) = cos(x)
explains why to use the symbols asin, asinh, acos, and acosh?
Yes - it shows that the functions DO have enough in common to be
treated similarily.