spacepaste

gsl_test.ml

  1.  
  2. exception Got_value of float
  3. let () =
  4. Gsl_error.init ();
  5. let exn =
  6. try
  7. let res = Gsl_cdf.gamma_Pinv ~p:0.250000 ~a:0.016000 ~b:1. in
  8. print_endline "got a value ?";
  9. Got_value res
  10. with
  11. | exc -> exc
  12. in
  13. print_endline "got an exception";
  14. raise exn
  15.  

output

  1.  
  2. $ ./gsl_test.native
  3. Fatal error: exception Gsl_error.Gsl_exn(6, "inverse failed to converge")
  4. $ ./gsl_test.byte
  5. got an exception
  6. Fatal error: exception Gsl_error.Gsl_exn(6, "inverse failed to converge")
  7. (Program not linked with -g, cannot print stack backtrace)
  8.