comp.lang.ada
 help / color / mirror / Atom feed
* Newton-Levenberg-Marquardt method in Ada?
@ 2018-08-08 23:35 van.snyder@jpl.nasa.gov
  2018-08-09  1:23 ` Lucretia
  2018-08-09 13:00 ` gautier_niouzes
  0 siblings, 2 replies; 3+ messages in thread
From: van.snyder@jpl.nasa.gov @ 2018-08-08 23:35 UTC (permalink / raw)


A colleague is developing an instrument to measure CO2 and oxygen concentration in the International Space Station.

In order to do that, he needs to invert a nonlinear function.

The usual way to do that is a Newton-Levenberg-Marquardt iteration.

Many numerical libraries have software for it in Fortran or C.

Does anybody have a highly-reliable Newton-Levenberg-Marquardt method in Ada?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Newton-Levenberg-Marquardt method in Ada?
  2018-08-08 23:35 Newton-Levenberg-Marquardt method in Ada? van.snyder@jpl.nasa.gov
@ 2018-08-09  1:23 ` Lucretia
  2018-08-09 13:00 ` gautier_niouzes
  1 sibling, 0 replies; 3+ messages in thread
From: Lucretia @ 2018-08-09  1:23 UTC (permalink / raw)


On Thursday, 9 August 2018 00:35:56 UTC+1, van.s...@jpl.nasa.gov  wrote:
> A colleague is developing an instrument to measure CO2 and oxygen concentration in the International Space Station.
> 
> In order to do that, he needs to invert a nonlinear function.
> 
> The usual way to do that is a Newton-Levenberg-Marquardt iteration.
> 
> Many numerical libraries have software for it in Fortran or C.
> 
> Does anybody have a highly-reliable Newton-Levenberg-Marquardt method in Ada?

You can import C and Fortran until you write your own in Ada.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Newton-Levenberg-Marquardt method in Ada?
  2018-08-08 23:35 Newton-Levenberg-Marquardt method in Ada? van.snyder@jpl.nasa.gov
  2018-08-09  1:23 ` Lucretia
@ 2018-08-09 13:00 ` gautier_niouzes
  1 sibling, 0 replies; 3+ messages in thread
From: gautier_niouzes @ 2018-08-09 13:00 UTC (permalink / raw)


Le jeudi 9 août 2018 01:35:56 UTC+2, van.s...@jpl.nasa.gov a écrit :
> A colleague is developing an instrument to measure CO2 and oxygen concentration in the International Space Station.
> 
> In order to do that, he needs to invert a nonlinear function.
> The usual way to do that is a Newton-Levenberg-Marquardt iteration.
> Many numerical libraries have software for it in Fortran or C.
> Does anybody have a highly-reliable Newton-Levenberg-Marquardt method in Ada?

Hi,
As suggested, you can use the pragma Import for your C or Fortran code.
Often I prefer to translate these algorithms (preferably from Fortran or Pascal using an automatic translator, then reviewing manually):
  - often they contain magic numbers, typically epsilon's for floating point types of some VAX machine that won't match the floating point type(s) you are actually using
  - you can spot border-line cases where variants of algorithms are switched, sometimes not in a smooth way...
  - you sometimes find that cannot be detected by Fortran or C, like indexes going outside their intended range
And don't forget to test extensively these numerical algorithms (in whichever language). Even code that seems to be "safe" because it is in a famous decades-old library can contain awful bugs - used by everybody, tested by nobody!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-09 13:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 23:35 Newton-Levenberg-Marquardt method in Ada? van.snyder@jpl.nasa.gov
2018-08-09  1:23 ` Lucretia
2018-08-09 13:00 ` gautier_niouzes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox