hi all,
iam having a very "strange" problem:
iam parsing values from java to jess by using:
fInfo.setSlotValue("certainty", new
Value(Float.parseFloat((String)info.elementAt(2)), RU.FLOAT));
the info-vektor is a string vector, sometimes elements of the string are
floats, therefore i chose the method Float.parseFloat.
public Vector getInfo(String info){
Vector v = new Vector();
}else if(info.equals("occupation")){
v.addElement(info);
v.addElement("beamter");
v.addElement("0.4"); /*<- (String)info.elementAt(2)
v.addElement("");
v.addElement("");
v.addElement("");
in jess the facts are "right" as long as info.elementAt(2) is 1, 0.5 or 0.
However, if it is
0.4 (as in the example above) the fact in jess is 0.40000000596...
or if it is 0.9 in the vector it becomes 0.89999999761 in Jess ?? !
Can someone explain this behaviour?
i really tried to change the 0.4 to 0.5 and it worked fine, but when i
change the same number to something not 0.5 or 1 again, the values in jess become
akward.???
TKS,
Ina
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr f|r 1 ct/ Min. surfen!
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------