tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Crawford <JCrawf...@PeerDigital.com>
Subject RE: Fuzzy Math
Date Thu, 05 Apr 2001 19:47:59 GMT
Is anyone running the below (Solaris/JDK 1.2.2_006 or _007) environment that
could test our JSP (also below)?  It would be a *huge* help to test this in
a similar environment.

Thanks again!

Jeff

-----Original Message-----
From: Jim Cheesman [mailto:jchees@msl.es]
Sent: Thursday, April 05, 2001 1:32 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: Fuzzy Math


At 10:49 PM 4/4/2001, you wrote:
>         'Fuzzy math' does *not* occur when:
>         a.  running Tomcat 3.2.1 with JDK1.2.2_006 (green_threads);
>         b.  on JavaWebServer2.0 running JDK 1.2.2_006 (green *or* native
>threads) in the *same* OS environment as Tomcat, or in its own slightly
>different Solaris 7 patch level environment.
>
>         I would greatly appreciate if someone could test this JSP on their
>system.
>
>         Thanks!


Runs fine on win2000, tomcat 3.2, jdk1.3


Jim


-----Original Message-----
From: Joe Laffey [mailto:joe@laffeycomputer.com]
Sent: Wednesday, April 04, 2001 3:03 PM
To: Jeff Crawford
Cc: 'tomcat-user@jakarta.apache.org'
Subject: Re: Fuzzy Math


This script works fine under Rh 6.2 Apache 1.3.19 mod_jk JDK 1.3_fcs
Tomcat 3.2


Joe Laffey
LAFFEY Computer Imaging
St. Louis, MO
----------------------
Need to do multi-file string replacement in Un*x, but don't want to mess
with sed? Try rpl. It's a free text replacement utility with source.
http://www.laffeycomputer.com/rpl.html  -- Check it out!
------------------------------------------------------------------------


-----Original Message-----
From: Jeff Crawford [mailto:JCrawford@PeerDigital.com]
Sent: Wednesday, April 04, 2001 2:50 PM
To: 'tomcat-user@jakarta.apache.org'
Subject: Fuzzy Math


	Hi all,

	George Bush just might call it just another example of "Al Gore's
Fuzzy Math." We are experiencing bizarre bad math in a JSP (included below
and enclosed).  Our environment is as follows:

	Solaris 7
	Tomcat 3.2.1
	Apache 1.3.19
	JDK1.2.2_006 or _007 (native_threads)

	The bad math is occuring in a variable called 'temp'.  In the
enclosed JSP (aptly named, "fuzzy_math.jsp"), we simply echo the variable
'temp' three times in the JSP.  It correctly echos the calculated values of
the variable for 10 reloads.  But if you reload the JSP 1 more time (for a
total of 11 reloads), the third echo of the 'temp' variable (labeled
'temp3') _will change_ from the correct mathmatical value (of 102) to an
incorrect value (5)!  (The mathematical value of the first two instances
('temp1' and 'temp2') are always correct.)  Again, this bizarre behavior
only occurs on the 11th reload (and remains at the incorrect number
indefinitely).

	--->This 'fuzzy math' does *not* occur with JDK1.2.2_006
(green_threads) (in the same above environment).<---
	 
	Here is the code (also enclosed).  "temp3: <%= temp + 2 %>; Should
be 102; <br>" is the problematic line.)
	--------------------------------------------------
	<%@ page language="java" %>
	<%!
	    final int firstTimeOffset = 5;
	    double minuteWidth; // Adjust value via hourWidth.
	%>
	<%  // Instance variables (will be created for each servlet call)
	    long temp = 10;
	    long start = 20; // minutes after midnight
	    long duration = 50;
	        minuteWidth = 2;
	%>
	<html>
	<head>
	<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
	</head>
	<body bgcolor="#FFFFFF" link="000000" vlink="#000000"
alink="fcc470">
	<%
	temp = (long) (firstTimeOffset + (start * minuteWidth));
	%>
	 temp1: <%= temp %>; Should be 45. <br>
	<%
	temp = (long) (duration * minuteWidth); 
	%>
	temp2: <%= temp %>; Should be 100. <br>
	temp3: <%= temp + 2 %>; Should be 102; <br>
	</body>
	</html>
	--------------------------------------------------

	Details Summary:

	Fuzzy math occurs when:
	a.  using JDK1.2.2_006 (native_threads) or JDK 1.2.2_007
(native_threads);
	b.  standalone Tomcat 3.2.1 (in the above environment) unaltered
downloaded binary

	'Fuzzy math' does *not* occur when:
	a.  running Tomcat 3.2.1 with JDK1.2.2_006 (green_threads);
	b.  on JavaWebServer2.0 running JDK 1.2.2_006 (green *or* native
threads) in the *same* OS environment as Tomcat, or in its own slightly
different Solaris 7 patch level environment.  

	I would greatly appreciate if someone could test this JSP on their
system.

	Thanks!

	Jeff Crawford
	Boulder, CO

 <<fuzzy_math.jsp>> 
Peer Digital, Inc.
Jeff Crawford
Configuration Manager
Senior Software Engineer
4001 Discovery Drive ยท Suite 270 
Boulder, CO 80303 
Direct:  303 544-7547
Main:  303 415 3550 
Fax:  303 415 3540 
www.peerdigital.com


 


Mime
View raw message