How to convert from scientific notations to double value ?

Hi all,
i need to convert a string 2E-23 to corresponding double values so that i can compare it one more existing double value. Is there any API present for this ?
Thanks and regards,
rosamama.

Note: This thread was originally posted in the Swing forum, but moved to this forum for closer topic alignment.

Similar Messages

  • Convert from scientific notation

    Can someone help me with this? I cannot get this working even using some of the tips I found on this site and elsewhere:
    Round this and format this with 2 decimals: '-2.58069E-11'.
    Now I realize this would end up -2.58, but it is giving me an error instead.
    Error converting data type varchar to numeric.
    SELECT CAST('2.58069E-11' AS NUMERIC(24,2))
    SELECT CAST('2.58069E-11' AS NUMERIC(24,12))
    I tried 12 just to make sure that there was enough room for the decimals
    If I use ISNUMERIC, it returns 1, so SQL Server considers it a number (at least with that function)
    The next example works, but it is not what I want.
    SELECT CAST('2.58069E-11' AS REAL) just returns the same thing with the 'E', (as REAL, of course)
    In these example I haven't done the rounding yet.
    I get all kinds of negative and positive numbers with different decimal lengths, but the scientific notation is particularly tricky.

    Before I put this to bed, I have found out both the above solutions are wrong when using a regular decimal:
    Try this:
    SELECT CAST(CAST('-1131658.27' AS REAL) AS NUMERIC(24,2))
    And this:
    SELECT CAST(CONVERT(REAL, -1131658.27) as DECIMAL(24,12))
    They both yield -1131658.25, and -1131658.250000000000, respectively.
    This is probably some floating point error, but how do I take care of it?

  • Re: How to converting from PL/SQL query to T-SQL query

    How to converting from PL/SQL query to T-SQL query... Its Urgent

    Download the
    SQL Server Migration Assistant for Oracle.  It will convert whole Oracle databases, or single queries or PL/SQL stored procedures.
    With caution that If your database is using Collation which is case sensitive SSMA will not work.SSMA doesnt guarantees 100% for conversion of Queries/stored proc /database if it fails to do so for some queries you will have to do it manually.
    But you can try
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Hi iam new to java can u tell me  how to convert from hashmap to string

    how to convert from hashmap to string

    Hi,
    This is not pure Java forum. Its more on JDBC and data connectivity to Orcle db from Java API.
    This link may answer your question:
    http://stackoverflow.com/questions/960807/hashmapkey-string-value-arraylist-returns-an-object-instead-of-arraylist
    Twinkle

  • How to convert from Restricted material to Unrested Material

    Hi Every Body,
         I have Posted the Batch Material in MB1C . But it was posted in RESTRICTED IN USE. How to convert from Restrict To UNRESTRICTED IN USE. Can Anybody Help me.

    Thank you for solving the problem both SAP Community Network and Mr Jurgen .
    suribabu

  • How to convert from image based pdf to text based pdf

    I have Adobe 9 Pro. How to convert from image based pdf to text based pdf? For example, if someone emails a scanned pdf to me, how do I convert that document into a text based pdf?

    To perform OCR, open the document and select: Document > OCR Text Recognition > Recognize Text Using OCR
    More information on the various options is in the Acrobat help doc.

  • How to convert from java.lang.Integer to int

    Could you please show me
    how to convert from java.lang.Integer to int?
    and how to convert from java.lang.Integer to String?
    Thanks,
    Minh

    Could you please show me
    how to convert from java.lang.Integer to int?
    and how to convert from java.lang.Integer to String?Tip: always keep a browser open on the API docs; if you've got a
    couple of MBs to spare, download the docs; it's very convenient.
    kind regards,
    Jos

  • How to convert from array to graph ?

    how to convert from array to graph ?

    A graph will accept an array of numbers.  Do you have an example of what you are looking for?
    And since somebody mentioned tutorials...
    3 Hour Introduction
    6 Hour Introduction
    LabVEW Basics
    Self Paced training for students
    Self Paced training beginner to advanced, SSP Required
    LabVIEW Wiki on Training
    Learning NI
    Getting Started with NI Products
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to convert from pdf to word

    how to convert from pdf to word

    If you are using Adobe Acrobat please post here: http://forums.adobe.com/community/acrobat/creating__editing_%26_exporting_pdfs
    If you are using Adobe Reader and ExportPDF, please read this: http://forums.adobe.com/docs/DOC-1812

  • How to convert from XML to Array ?

    how to convert from XML to Array ?
    thanks in advance

    this is a segment of the xml object:
    var myXML:XML =
    <data>
    <task>
    <taskID>2</taskID>
    <startDate>2/15/2007</startDate>
    </task>
    </data>
    i want to conver myXML into ArrayCollection: like this:
    private var expenses:Array = [
    {taskID:"1", startDate:"2/15/2007"},
    {taskID:"2", startDate:"4/15/2007"}
    how i can do it ? and tell me how to retrieve the data from
    the collection
    thanks

  • How to convert from military time (string) to regular time?

    How to convert from military time (string) to regular time?
    First of all I need to let you know I'm very new to Crystal Reports, so I apologize and will need detailed instructions if possible.
    I have created a Crystal Report pulling information from the received time field.  On the report, the time is showing in military time (ex. 16:00:00).
    How can I convert this time to normal time (ex. 4:00:00)
    Since the field is a 'String' field and not a 'Time' field, I do not have the option of changing it under the field properties.
    I hope someone can help with this.
    Thank you in advance.

    As my fields were date only and not datetime, I ended up using the following,
    If IsDate({CallLog.EmailRecdDate}) Then
         CDate({CallLog.EmailRecdDate})
    Else
         CDate(0,0,0)
    You answer lead me in the right direction.
    I'm still having an issue with the 'Else' statment returning 12:00:00 because of the CDate(0,0,0), but I'm not sure what else I can use to return a blank space on the report.  Any ideas?
    Thanks again!

  • How to convert from lowercase letters to uppercase letters?

    how to convert from lowercase letters to uppercase letters?

    Hi KS,
    In the transfer / update rules you can use a formula to convert lowercase to upper case letters.
    Functions for Character string>>TOUPPER(CHAR)
    Hope this helps.
    Bhargava
    Message was edited by:
            Sista Bhargava Kumar

  • How to convert from xml file to html using java code

    How to convert from xml file to html file using java code

    Get yourself Apache Xalan or Saxon or some XSLT processor
    String styleSheet = "/YourXSLTStylesheet.xsl";
    String dataSource = "/YourXMLDocument.xml";
    InputStream stylesheetSource = TransformMe.class.getResourceAsStream(styleSheet);
    InputStream dataSourceStream = TransformMe.class.getResourceAsStream(dataSource);
    OutputStream transformedOut = new FileOutputStream("filename.html");
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(new StreamSource(stylesheetSource));
    transformer.transform(new StreamSource(dataSourceStream), new StreamResult(transformedOut));You'll also need to learn XSLT if you don't already know that. Here's a good place to start
    http://www.w3schools.com/xsl/

  • How to convert  from  varchar to blob ?

    How to convert from varchar to blob ?
    thanks

    Here is a small PL/SQL block that we have used to convert varchar2 to blob.
    declare
    cursor get_blob is
    select blob_statement
    from report
    where report_id = 205
    FOR UPDATE OF blob_statement;
    v_loc blob;
    v_raw_buffer raw(32767);
    v_amount binary_integer := 32767;
    v_offset binary_integer := 1;
    v_buffer VARCHAR2(32767);
    begin
    open get_blob;
    fetch get_blob into v_loc;
    close get_blob;
    v_buffer := 'Sample text';
    v_raw_buffer := utl_raw.cast_to_raw(v_buffer);
    v_amount := utl_raw.length(v_raw_buffer);
    dbms_lob.write(v_loc, v_amount, v_offset, v_raw_buffer);
    commit;
    end;

  • Numeric Values Converted to Scientific Notation

    My BPEL process converts numeric values to scientific notation (eg. 12345678 is converted to 1.2345678E7). This then causes problems when I try to perform any mathematical operations on these values during an XSL transformation (output - NaN)
    Is there any way I can stop this data conversion?
    This occurs with BPEL 10.1.2.0.2. I'm loading the data from an Oracle 9.2 database using the DbAdapter.
    I've written an XSL routine to convert these values back to the correct decimal notation, but would prefer to stop this happening rather than workaround the problem.

    On further investigation, this occurs for values loaded from Oracle FLOAT database type.
    The XSD generated for the DbAdapter uses type xs:double for this field, but I've also tried changing this to xs:decimal & xs:float and still get the same problem.

Maybe you are looking for

  • My display won't go to sleep

    I just recently upgraded to the Mountain Lion OS and now my computer won't go into the screen saver (set at 10 minutes) and the display won't go to sleep (after 15 minutes).  It is on all the time.  Any suggestions?

  • How to Publish an eBook in PDF Format

    Start a New PDF eBook Project From the Create > Create eBooks page click Make Your eBook. Alternatively, go to My Projects > Start a Project > eBook  Enter a title, author name and select your project's availability. Click the Save & Continue button.

  • Messages not showing up in Message Folder

    I am not receiving any text messages in the message folder. I can search for them through the search function and I am receiving them on my phone, but only the email messages show up in the folder. I checked all of the options and I can't figure out

  • How to set up Environment for SOA Suite Tutorial

    Hi, I am just trying oracle products for the first time and recently started the SOA Suite Tutorial. Unfortuantely I am starving quite at the beginning in section "2.6.2 Create a Connection Pool". I just don't know what to enter as JDBC URL. I am usi

  • Service Virtualization ...?

    Hi Experts, Here is the problem at hand I have two enterprise systems A and B which communicate via a Web Service, I need to develop an intermittent system that can monitor this web service grabbing the interactions (request/responses) between these