Path: csiph.com!weretis.net!feeder4.news.weretis.net!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!buffer1.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Fri, 07 Oct 2016 11:01:09 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: Is there any place to talk about language features? References: <5def853b-2418-4f89-a7ad-3ea77b66b654@googlegroups.com> <47b562a1-78e4-4c20-86e5-e980954ab436@googlegroups.com> <6f007f5a-7bc1-48d8-aa2b-549fa09e583c@googlegroups.com> <2167a3c4-da6c-47f4-8169-5b6cc102036f@googlegroups.com> <31cf30f6-1b7a-4a27-bc79-44866f8473e5@googlegroups.com> <4a66da60-0345-41f3-8f3d-6e9e1243e752@googlegroups.com> <37b0b934-8177-4b10-8f98-05ab8e60981b@googlegroups.com> Date: Fri, 07 Oct 2016 17:01:09 +0100 Message-ID: <87zimgtagq.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:WO9jfHBNj3CmcDVh6lTzvW7XaHc= MIME-Version: 1.0 Content-Type: text/plain Lines: 21 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-miY24GnT0WaE7kDCNaqkZeCdWAXkCFuo9oaCAPse8z43ztpgA5zJegyiiC4RWzUVKyE6EGu9TJEkr2h!TMQlVltxgyaa3ArcOrLR9ca1pgysdye89eknot40d8VBAOtKATR1nFO5OmQs43oAHAo6 X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2770 Xref: csiph.com comp.lang.c:94557 Malcolm McLean writes: > On Thursday, October 6, 2016 at 3:34:08 PM UTC+1, gwowen wrote: >> On Thursday, October 6, 2016 at 8:38:16 AM UTC+1, Malcolm McLean wrote: >> >> > Everything that is a "calculation" can be and almost always should >> > be expressed as a Malcolm-function. >> >> struct Matrix mat = generate_singular_matrix(); >> struct Matrix m2 = inverse(mat); >> >> struct Vector y; >> struct Matrix m = ill_conditioned_matrix(); >> struct Vector x = solve(m,y); >> > If if write a function to invert a matrix, generally it's not > reasonable to specify that caller shall provide us with an > invertible matrix. We return 0 on success or -1 on fail, but > "fail" here doesn't mean that the function has failed. The defence rests, your honour.