guyblade.com #/


PSN
Gamercard


2009 Oct 16 yuffie


Guy Blade Guy Blade---20:49:00


Racine Carree
I've talked in the past about the problems that I have with the Ada programming language. I thought may days of fighting with it had come to an end as we'd found a work around that made it so that we didn't need to use the Ada code (written and commented in French) we'd been provided in order to do our processing. A week or so ago, I found out that getting the Ada code working was required for a validation task that is apparently my responsibility. As such, I'm fighting with Ada again. After running the code again for the first time in a year, it returned the familiar "ERREUR_CALCUL"--Calculation Error--a wonderfully vague thing. Digging around led me to find that Ada does have some ways to examine exceptions. Most notably, you can use Ada.Exceptions.Exception_Information to get a filename and line number where the original exception occured. This led me to the function RACINE_CARREE--a 139 line long function--where the original error was occuring. Scanning over the function gave me no help (even though it happened to have comments written in English), but Google Translate told me that racine carree means square root. My first reaction was "Why is the square root failing?" which I quickly saw was because it is apparently being passed a number less than zero. My second reaction was "It takes over 100 lines to implement a square root function?". Ada has a square root built into the language spec. Also, a Newton's method implementation should be like 10 lines even in the tarpit that is Ada.

Regardless, I now have to figure out what impolite function is calling the square root with negative numbers...

Published by XPostcurses


Permalink to this post     Com/0

Front Page

Archive
Copyright 2002-2024 Blade Libergnosis//Powered By Blogger