octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48013] Java integration: conversion to double


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #48013] Java integration: conversion to double
Date: Sun, 21 Aug 2016 08:39:29 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40

Update of bug #48013 (project octave):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #28:

Ernst,
Yes I have Matlab (r2016b prerelease), at work I have several more versions,
the oldest (retired but still present) r2007a, then 2012a, 2014a and 2016b.

After a bit more delving into it w Matlab (r2016b) it shows that you are
right.

The reason I was a bit misled is that Matlab acts deceptively: in the command
terminal it does show the converted value (doubles) of java.math.BigDecimal
objects, i.e. suggesting autoconversion, but it does not really convert them
to doubles behind the scenes.
So in way it converts them but at the same time not.

To show what I mean:

>> cl = sh.getCellAt (0, 0)
cl =
<table:table-cell
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
office:value-type="float" office:value="1"
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
calcext:value-type="float"><text:p
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0">1</text:p></table:table-cell>
>> cl.getValueType
ans =
FLOAT
>> cl.getValue
ans =
1
>> 


...where I would expect "cl.getValue" to return something like
<java.math.BigDecimal> rather than a number, like Octave does:

debug> scell.getValue ()
ans =
<Java object: java.math.BigDecimal>



OK, I'll close this report again.
Sorry for the noise, thanks for your attention.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48013>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]