From: (see below) on
On 12/08/2010 20:23, in article m28w4bfxdy.fsf(a)pushface.org, "Simon Wright"
<simon(a)pushface.org> wrote:

> csampson(a)inetworld.net (Charles H. Sampson) writes:
>
>> Simon Wright <simon(a)pushface.org> wrote:
>>
>>> csampson(a)inetworld.net (Charles H. Sampson) writes:
>>>
>>>> I then overloaded "+" and "-" for (Bearing, Turn_Angle) arguments
>>>> and Bearing return value. In those functions is where the mod 360
>>>> occurred. (Actually, mod 360.0, as it were.)
>>>
>>> Depending on what is doing the turning, in our application that would
>>> in some cases have to be mod 720.0 ...
>>
>> I'm puzzled. Unless you're very careful, intermediate calculations
>> could result in a quasi-Bearing of more than 360 degrees but I'm pretty
>> sure most programmers on my project would have been surprised to see a
>> real bearing of 360 degrees or more.
>
> A tracker radar like this one (hope the link will work) might be able to
> turn through an unlimited number of revolutions, or (with a more
> mechanical design) there might be a limit on how many revs it could
> manage. So if it's currently pointing 10 degrees to starboard, how much
> further can it go before having to unwind?
>
> I agree that this is Training, not Bearing, of course.
>
> http://www.artisan3d.co.uk/static/bae_cimg_radar_Fi_latestReleased_bae_cimg_ra
> dar_Fi_Web.jpg

I think quantum mechanics codes would require angles mod 720 for spin 1/2
particles. 8-)

--
Bill Findlay
<surname><forename> chez blueyonder.co.uk


From: Elias Salomão Helou Neto on
On Aug 12, 5:21 pm, "(see below)" <yaldni...(a)blueyonder.co.uk> wrote:
> On 12/08/2010 20:23, in article m28w4bfxdy....(a)pushface.org, "Simon Wright"
>
>
>
>
>
> <si...(a)pushface.org> wrote:
> > csamp...(a)inetworld.net (Charles H. Sampson) writes:
>
> >> Simon Wright <si...(a)pushface.org> wrote:
>
> >>> csamp...(a)inetworld.net (Charles H. Sampson) writes:
>
> >>>>      I then overloaded "+" and "-" for (Bearing, Turn_Angle) arguments
> >>>> and Bearing return value.  In those functions is where the mod 360
> >>>> occurred.  (Actually, mod 360.0, as it were.)
>
> >>> Depending on what is doing the turning, in our application that would
> >>> in some cases have to be mod 720.0 ...
>
> >>      I'm puzzled.  Unless you're very careful, intermediate calculations
> >> could result in a quasi-Bearing of more than 360 degrees but I'm pretty
> >> sure most programmers on my project would have been surprised to see a
> >> real bearing of 360 degrees or more.
>
> > A tracker radar like this one (hope the link will work) might be able to
> > turn through an unlimited number of revolutions, or (with a more
> > mechanical design) there might be a limit on how many revs it could
> > manage. So if it's currently pointing 10 degrees to starboard, how much
> > further can it go before having to unwind?
>
> > I agree that this is Training, not Bearing, of course.
>
> >http://www.artisan3d.co.uk/static/bae_cimg_radar_Fi_latestReleased_ba...
> > dar_Fi_Web.jpg
>
> I think quantum mechanics codes would require angles mod 720 for spin 1/2
> particles. 8-)
>
> --
> Bill Findlay
> <surname><forename> chez blueyonder.co.uk

Well, we are definitely drifting away from the original question. So
much that I am considering to give up reading answers from this
post...

Anyway, someone prematurely implied that I may be doing premature
optimization. The fact is that I do know, from profiling, how
important is _not_ to range check in my specific application, so I
will try to give you a "bottom line" of what have been said that
really matters to me.

1) You can, in more than one way, tell the compiler to suppress most
(any?) checks, but people do not advise to do so. Even if I say that I
do need that :(

2) It is not necessary for the compiler to actually suppress any
checking! It seems that the LRM demands the compiler to allow you to
ask for the suppression, but it does mandate the compiler to actually
skip such checks. Well, this is, to say the least, funny - unless I
misunderstood something here.

I am having a fairly good impression of Ada's features, but the effort
it would take to learn the language may eventually not pay off.

Thank you,
Elias.

P.S: Multidimensional _arrays_ are not multidimensional _matrices_
neither are them MD _images_. The two latter are far more specific
classes and the last case even needs to be templated in, say, pixel
type, etc.
From: Elias Salomão Helou Neto on
On Aug 13, 12:08 pm, Elias Salomão Helou Neto <eshn...(a)gmail.com>
wrote:
> On Aug 12, 5:21 pm, "(see below)" <yaldni...(a)blueyonder.co.uk> wrote:
>
>
>
>
>
> > On 12/08/2010 20:23, in article m28w4bfxdy....(a)pushface.org, "Simon Wright"
>
> > <si...(a)pushface.org> wrote:
> > > csamp...(a)inetworld.net (Charles H. Sampson) writes:
>
> > >> Simon Wright <si...(a)pushface.org> wrote:
>
> > >>> csamp...(a)inetworld.net (Charles H. Sampson) writes:
>
> > >>>>      I then overloaded "+" and "-" for (Bearing, Turn_Angle) arguments
> > >>>> and Bearing return value.  In those functions is where the mod 360
> > >>>> occurred.  (Actually, mod 360.0, as it were.)
>
> > >>> Depending on what is doing the turning, in our application that would
> > >>> in some cases have to be mod 720.0 ...
>
> > >>      I'm puzzled.  Unless you're very careful, intermediate calculations
> > >> could result in a quasi-Bearing of more than 360 degrees but I'm pretty
> > >> sure most programmers on my project would have been surprised to see a
> > >> real bearing of 360 degrees or more.
>
> > > A tracker radar like this one (hope the link will work) might be able to
> > > turn through an unlimited number of revolutions, or (with a more
> > > mechanical design) there might be a limit on how many revs it could
> > > manage. So if it's currently pointing 10 degrees to starboard, how much
> > > further can it go before having to unwind?
>
> > > I agree that this is Training, not Bearing, of course.
>
> > >http://www.artisan3d.co.uk/static/bae_cimg_radar_Fi_latestReleased_ba....
> > > dar_Fi_Web.jpg
>
> > I think quantum mechanics codes would require angles mod 720 for spin 1/2
> > particles. 8-)
>
> > --
> > Bill Findlay
> > <surname><forename> chez blueyonder.co.uk
>
> Well, we are definitely drifting away from the original question. So
> much that I am considering to give up reading answers from this
> post...
>
> Anyway, someone prematurely implied that I may be doing premature
> optimization. The fact is that I do know, from profiling, how
> important is _not_ to range check in my specific application, so I
> will try to give you a "bottom line" of what have been said that
> really matters to me.
>
> 1) You can, in more than one way, tell the compiler to suppress most
> (any?) checks, but people do not advise to do so. Even if I say that I
> do need that :(
>
> 2) It is not necessary for the compiler to actually suppress any
> checking! It seems that the LRM demands the compiler to allow you to
> misunderstood something here.
>
> I am having a fairly good impression of Ada's features, but the effort
> it would take to learn the language may eventually not pay off.
>
> Thank you,
> Elias.
>
> P.S: Multidimensional _arrays_ are not multidimensional _matrices_
> neither are them MD _images_. The two latter are far more specific
> classes and the last case even needs to be templated in, say, pixel
> type, etc.

Sorry, but where it is written

> ask for the suppression, but it does mandate the compiler to actually
> skip such checks. Well, this is, to say the least, funny - unless I

you should read


ask for the suppression, but it does NOT mandate the compiler to
actually
skip such checks. Well, this is, to say the least, funny - unless I

Sorry again,
Elias.
From: Dmitry A. Kazakov on
On Fri, 13 Aug 2010 08:08:42 -0700 (PDT), Elias Salom�o Helou Neto wrote:

> 1) You can, in more than one way, tell the compiler to suppress most
> (any?) checks, but people do not advise to do so. Even if I say that I
> do need that :(

You think you need that, but you cannot know it, because you didn't used
Ada and have no experience to realistically estimate the amount of checks
an Ada compiler would introduce in your, not yet developed program.

> P.S: Multidimensional _arrays_ are not multidimensional _matrices_

I don't see any difference, unless specialized non-dense matrices are
considered.

> neither are them MD _images_.

Same here. Multi-channel images, sequences of images, scenes can be seen
and implemented as arrays. Again, unless some special hardware is in play.

> The two latter are far more specific
> classes and the last case even needs to be templated in, say, pixel
> type, etc.

I don't see a great need in that. Usually the type of pixel (grayscale,
tricky color models, separate channels etc) influences image operations so
heavily that the common denominator might become too thin to be useful, at
least in the case of image processing.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
From: (see below) on
On 13/08/2010 16:08, in article
61f149b9-00ff-40cd-9698-01e69fdc5c0f(a)v15g2000yqe.googlegroups.com, "Elias
Salom�o Helou Neto" <eshneto(a)gmail.com> wrote:

> 1) You can, in more than one way, tell the compiler to suppress most
> (any?) checks, but people do not advise to do so. Even if I say that I
> do need that :(
>
> 2) It is not necessary for the compiler to actually suppress any
> checking! It seems that the LRM demands the compiler to allow you to
> ask for the suppression, but it does mandate the compiler to actually
> skip such checks. Well, this is, to say the least, funny - unless I
> misunderstood something here.

Quite so. You can be confident that the compiler will suppress the checks as
asked, *unless* you are using an architecture (e.g. B6700) where that is
simply impossible. Since Ada is a portable language, the semantics has to
allow for the latter possibility.

--
Bill Findlay
<surname><forename> chez blueyonder.co.uk