Hi there,

I am running code that calculates some Max Likeihood values by solving some 
equations using Newton-Raphson method.  In this case **any** value between (and 
including) 0 and 1 is possible. I do this for a large number of parameters in a 
long running loop.  Every so often I write this out to an SQLite database.

Going through the SQLite code, while the database reads are "binary" the 
inserts are by submitting a SQL command of the form -

'insert into MLE (psi, var, p, s, k) values ' , Followed by a formatted list of 
lists of values (0.7, 0.1, 0.7, 3, 7), (0.3, 0.2, 0.5, 3, 8), ...

The SQLite routines need to get the formatted values. Foreign verb   8!:0  is 
used to format up character representations.  Verb sqlinsert_psqlite_ calls  
fixcol which uses the 8!:0 foreign verb.
 
I now discover that some of my calculations end up extremely small (< 1e_300), 
and these produce a system error in 8!:0.  The code below demonstrates the 
problem.


   JVERSION
Engine: j805/j64/windows
Beta-12: commercial/2016-09-30T15:50:47
Library: 8.05.14
Qt IDE: 1.5.3/5.6.2
Platform: Win 64
Installer: J805 install
InstallPath: r:/j/j64-805
Contact: www.jsoftware.com


   
   8!:0 ] 9.06184e_293  3.71249e_297 3.66555e_301 7.57543e_305 2.9368e_308 
1.95799e_311
jtsprintfeD: decpt
|system error
|       8!:0]9.06184e_293 3.71249e_297 3.66555e_301 7.57543e_305 
|2.9368e_308 1.95799e_311
   
[[[Note underscores are sometimes screwed by this email system]]]


Issues:

A/  Can  8!:0 check for positive numbers less than 10e_310 (and negative 
numbers greater than _10e_310)

B/  Is it possible for SQLite insert verbs to use binary transfer instead of 
formatting up an sql insert command.

C/  Is it the case that foreign 8!:0 actually uses a J coded verb  jtsprintfeD 
and/or decpt?

D/  Why won't email editor correctly handle underscores?  Sometime underscores 
appear correctly other times they are invisible?

Ian
Ian Shannon
Science Strategy Branch
Science Division
Office of Environment and Heritage
PO Box A290
Sydney South
NSW      1232
T: +61 2 99 955 490
E: Ian Determinant Shannon Atop Environment Determinant nsw Determinant gov 
Determinant au 

Please consider the environment before printing my email

A recent survey has found that 6 out of 7 people includes approximately 86% of 
the population
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
This email is intended for the addressee(s) named and may contain confidential 
and/or privileged information. 
If you are not the intended recipient, please notify the sender and then delete 
it immediately.
Any views expressed in this email are those of the individual sender except 
where the sender expressly and with authority states them to be the views of 
the NSW Office of Environment and Heritage.

PLEASE CONSIDER THE ENVIRONMENT BEFORE PRINTING THIS EMAIL
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to