Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FINNAPL Idiom 169.Conversion from degrees to radians X←D

8 views
Skip to first unread message

AAsk

unread,
Oct 4, 2010, 12:13:25 PM10/4/10
to
I think there is an error in this idiom:

X×○÷180

should read

X×○1÷180

I am not sure who to contact; if you do, then please do.

David Liebtag

unread,
Oct 4, 2010, 12:24:15 PM10/4/10
to
In APL2, both expressions yield the same result.

David Liebtag
IBM APL Products and Services


AAsk

unread,
Oct 4, 2010, 12:44:43 PM10/4/10
to
> In APL2, both expressions yield the same result.

Likewise with APLX but the expression X×○÷180 fails with APL+Win.

However, the reverse fails with APLX also i.e

X×180÷○

Jane Sullivan

unread,
Oct 4, 2010, 1:41:54 PM10/4/10
to
AAsk wrote:
>> In APL2, both expressions yield the same result.
>
> Likewise with APLX but the expression X×?÷180 fails with APL+Win.

>
> However, the reverse fails with APLX also i.e
>
> X×180÷?

What on earth are you trying to do here?

Try parsing the original expression
X is the left argument
× is a dyadic function (times)
? is a monadic function (pi times)
÷ is a monadic function (reciprocal)
180 is the right argument
from which we get
÷180
0.005555555556
?÷180
0.01745329252
X?45
X×?÷180
0.7853981634

Your reverse expression X×180÷? fails because it ends with a function
with no argument.


--
Jane


Richard Nabavi

unread,
Oct 5, 2010, 5:02:24 AM10/5/10
to
On 4 Oct, 17:44, AAsk <AA2e...@lycos.co.uk> wrote:
> > In APL2, both expressions yield the same result.
>
> Likewise with APLX but the expression X×○÷180 fails with APL+Win.
>
>

The idiom is correct, and should work in any dialect of APL.

Are you sure it fails on APL+Win? I don't have an up-to-date copy,
but it worked on an old version I tried.

Richard Nabavi
MicroAPL

Phil Last

unread,
Oct 5, 2010, 5:45:39 AM10/5/10
to
On Oct 5, 10:02 am, Richard Nabavi <micro...@microapl.demon.co.uk>
wrote:

I don't have APL+WIN either but two explanations offer themselves:

0. something above is a typo
1. reciprocal isn't defined in APL+WIN

I'd go for 0.

AAsk

unread,
Oct 5, 2010, 7:25:43 AM10/5/10
to
> Are you sure it fails on APL+Win?  I don't have an up-to-date copy,
> but it worked on an old version I tried.
>
> Richard Nabavi
> MicroAPL

My mistake (typo): it does work with APL+Win.

ArrayMac

unread,
Oct 5, 2010, 9:54:10 AM10/5/10
to
When Divide is used monadically, the 1 is assumed. Since 'it fails'
doesn't tell the whole story, what error message are you getting?
Message has been deleted
0 new messages