Re: [Jgeneral] Discovery of system error

2018-05-15 Thread chris burke
The latest sqlite addon v1.0.22 for j807 writes using binary values bound
to columns. You should expect an order of magnitude better performance for
both read/write compared to ddsqlite, for non-trivial data sets.

This is for j807 only, since the underlying code for write is completely
new. If you want to use it in 806, install the 807 version, then if OK,
copy the addon to your 806 addon directory.

On Mon, Feb 19, 2018 at 3:53 PM, Ian Shannon <
ian.shan...@environment.nsw.gov.au> wrote:

> Thanks Bill,  I can see I will need to go to 806.
>
> I had problems with ddsqlite (after OS changes/fixes/...) so changed the
> coding to use sqlite.
>
> sqlite did seem to be quicker, but binding binary values to columns should
> be quicker than formatting values so a plus for ddsqlite.
>
> Ian
--
For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jgeneral] Discovery of system error

2018-02-19 Thread Ian Shannon
Thanks Bill,  I can see I will need to go to 806.

I had problems with ddsqlite (after OS changes/fixes/...) so changed the coding 
to use sqlite.

sqlite did seem to be quicker, but binding binary values to columns should be 
quicker than formatting values so a plus for ddsqlite.

Ian
-Original Message-
From: General [mailto:general-boun...@forums.jsoftware.com] On Behalf Of bill 
lam
Sent: Tuesday, February 20, 2018 10:45 AM
To: General forum <gene...@jsoftware.com>
Subject: Re: [Jgeneral] Discovery of system error

8!:0 ] 1.95799e_311
┌┐
│1.95799e-311│
└┘
The bug was already fixed in j806

There are 3 ways to interface sqlite from J. 2 of them, odbc and ddsqlite, can 
bind columns with binaries values for inserting rows, but the other addon 
sqlite can't.
--
For information about J forums see http://www.jsoftware.com/forums.htm
--
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

Re: [Jgeneral] Discovery of system error

2018-02-19 Thread bill lam
8!:0 ] 1.95799e_311
┌┐
│1.95799e-311│
└┘
The bug was already fixed in j806

There are 3 ways to interface sqlite from J. 2 of them, odbc and ddsqlite,
can bind columns with binaries values for inserting rows, but the other
addon sqlite can't.
--
For information about J forums see http://www.jsoftware.com/forums.htm

[Jgeneral] Discovery of system error

2018-02-19 Thread Ian Shannon
Report of System error.

   
  8!:0 ] 1.95799e_311
jtsprintfeD: decpt
|system error
|   8!:0]1.95799e_311
  

   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

===

Error occurs with argument smaller than 1e_308

Eric notified me that a previous post explaining why I am trying to format 
extremely small numbers ended up categorised as spam! Hence just the guts of 
the issue in this post.

--
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

[Jgeneral] Discovery of system error

2018-02-19 Thread Ian Shannon
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