Deutsch   English   Français   Italiano  
<87o75mb5yc.fsf@nosuchdomain.example.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.arch
Subject: Re: COBOL, Article on new mainframe use
Date: Wed, 21 Aug 2024 02:06:35 -0700
Organization: None to speak of
Lines: 26
Message-ID: <87o75mb5yc.fsf@nosuchdomain.example.com>
References: <v9t3ih$2e8ee$1@dont-email.me>
	<memo.20240818192128.19028F@jgd.cix.co.uk>
	<v9u5eo$2ivte$3@dont-email.me> <v9uebs$8u3$1@gal.iecc.com>
	<TX2xO.60952$D6Ha.50816@fx37.iad> <va38p5$3i3ne$10@dont-email.me>
	<87zfp6bst1.fsf@nosuchdomain.example.com>
	<76220abd8c5b8ca50c4b7a5515d2a466@www.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Aug 2024 11:06:36 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="7a2cb821a5a9c1554a17483648fb73a0";
	logging-data="4006544"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1//utOHM6uGzsFpVid397xy"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:RzTNyWMWPSGSkyvrDPNzZcItocE=
	sha1:6QnXSb55wLa+uHCqDzgWQsj4hjY=
Bytes: 2062

mitchalsup@aol.com (MitchAlsup1) writes:
> On Wed, 21 Aug 2024 0:52:58 +0000, Keith Thompson wrote:
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>> On Tue, 20 Aug 2024 11:51:14 -0400, EricP wrote:
>> [...]
>>>>    x^17 = ((((x^2)^2)^2)^2)*x
>>>>
>>>
>>> I’d really like to see how you’d write that in COBOL ...
>>
>>         COMPUTE X17 = ((((X**2)**2)**2)**2)*X
>
> Why not::
>
>          COMPUTE x17 = x**17
>
> There are compilers these days that produce the above from
> the simpler evaluation.

Sure, I wouldn't complexify x**17 to ((((X**2)**2)**2)**2)*X without a
very good reason.  I was just giving the most direct answer to the
question.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */