Elimination of the double precision

I must eliminate double vagueness with math real number in my application, but I cannot understand how to use the BB API. I tried to write a method that checks for series 9 and 0, and rounded up to the previous digit upward or by eliminating the final figures, but my method caused too many problems.

Edit: I would like to give an example of the error:

I expect this result: 0.0002

But after some calculations double to keep the result, the program returns 0.0002000001

Any ideas on how I can eliminate double vagueness?

Thank you

Scott

Thanks for all the answers. I forgot this thread, but remembered it when the problem came once again.

I solved the problem by using whole mathematics instead of double math, and I use indexOf(".") for formatting integers. It was actually a relatively easy solution.

Thank you
Scott

Tags: BlackBerry Developers

Similar Questions

  • VISA Read Double Precision Corruption number with the 2400 Keithly

    I am confused on this point.  I have two systems with built in GPIB Controllers PXI.  Among the randomally systems began to show the behavior where the double precision read data returned orders gibberish.  On the other system, I use the same code and everything works.  Chain controls standard job very well (voltage value, current value, query set of voltage etc.).  I tried the following:

    Reset computer

    Keithly instruments exchanged (the problem follows the PC)

    Exchanged GPIB cables

    Update driver 488.2

    Used separate HS-USB-controller GPIB.

    I will be reinstall NI-VISA as well.

    The only difference is that I installed a few other drivers LeCroy instrument to the failed system.  But the problem is a not deliver after I installed the drivers, it occurred during the performance of my code.

    Has anyone ever seen this before?  What could be other causes?

    The problem was with the Keithley, change the format of the data without my knowledge.

  • Imaging of double precision of uint8

    Hello

    I am writing a program that manipulates image processing image gradients. Since negative gradients come into picture, I need to convert the image in double precision type uint8. How can I do this? I tried to use mathscript and although the double precision is obtained using the double function I need to leave mathscript to perform other operations such as filtering. How can I transfer this image of double precision outdoors and filter with it?

    Hello

    If you are satisfied with the float data type, why not just use the convolution operator?

    For example (using a kernel of Sobel, you can choose your own of course):

    Best regards

    K

  • Can I enter both a table and a constant of double precision in the VI form?

    I would like to calculate a new 1 d array using the formula VI. LabVIEW 'smart enough' to enter a 1 d table and a double precision constant in the VI form and leave a 1 d table receives basic commands?

    For example, can I enter [1 2 3] table and the constant [2] and say "table * constant-1" in the VI form and get an output of [1-3-5] or do I have to make a loop for or something?

    The Express VI formula seems that it can have up to 8 inputs.

    Twolfe, the best way to find an answer to this type of question is to try it.

    I didn't know this (because I have no reason to use that express VI), but you can wire a table to it.  He treats like any other LabVIEW operation on arrays.

    But if you were to make a loop, then you should already be avoiding Express VI and start making actual emissions.

  • Convert a table to a cluster of 4 elements array values 2D 2D double precision, or a table 1 d

    Y at - it an easy way to convert a 2D cluster table (4 elements each including a Boolean value and three numbers dbl) to a table 2D or 1 d of double precision values? I need to store my data in a text file to control a robot, I'm trying.

    Thank you.

    There are 1 million different ways to do it. The best thing to do would be to leave the data exactly as it is and simply use Flatten in XML format (search the palette). It accepts virtually any type of data, including a 2D cluster table as you described. He will spit human readable (although not necessarily nice) text that you can write to a text file. Then, read you data from the file and use Unflatten of XML to do the reverse.

    Or you can use a similar model to flatten your data in a 1 d of double table which you can then unflatten.

  • Will I lose data conversion to double precision single-precision float?

    Before you say Yes...

    I use a crio unit in scan mode interface. Which returns the mode of scanning values in floating point double precision. Apparently I'm supposed to be able to choose between double precision fixed-point ("not calibrated") and ("calibrated") floating point data, but this feature seems to be exclusive to the fpga interface and is not available with the scan engine. The two data types are 64 bits per value, when it comes to the size on disk, anyway is still basically the same.

    The system continuously records 13 channels of comma floating double-precision at 200 Hz. using the binary file write, I measured it is about 92 MB/hr on the disk. (more than 120 MB/hr with PDM and much more to write on the worksheet) In short, this 92 mb/hr rate is just too much data on the disk on this system.

    The modules that I record since, 9236 9237 and 9215 c-series modules, have 24-bit a/d converters or less. Does this mean that I have not need 64-bit to represent the number and accuracy even?

    Can I force/cast point values double-precision floating that I receive of the variables of e/s scan engine to the data type of a different, smaller, as a single-precision floating point and retain the same precision?

    Nickerbocker wrote:
    between noise and precision equipment, I doubt that it makes much difference.

    You can test it by looking at the difference between a DBL and converted to SGL DBL. But I support the Nickerbocker trick. I don't think it will make the difference

  • Need drivers for the Sidewinder Precision Pro X 03-57540

    I NEED DRIVERS FOR THE SIDEWINDER PRECISION PRO XO3-57540 JOY STICK.

    Hi LARRYPEDEN,

    Visit the following link to download the driver:

    http://www.Microsoft.com/hardware/en-us/d/SideWinder-X3-mouse

    You can also follow this step to do the same thing:

    a. double-click the type of device you want to update or change.

    b. right click on the device driver specific, you want to update or change.

    c. click put to update driver to open the Hardware Update Wizard. Follow the instructions in the wizard.

    More information on:

    How to manage devices in Windows XP

  • List of simple questions and yes or no on the workstation Precision T7910

    (1) I bought a T7910 with 1 single processor, I can add a second processor later?

    (2) all 7910 models come with a card mother two-way?

    (3) there are videos on Youtube showing a guy change his disk HARD 5.25 "ports in 2.5" SSD ports with cables, screws, metal plates and these little fans and others, but there seems to be no way to know where he got the cables, screws and small fans, make this kind of options, cables, screws, plates and fans etc come with the T7910?

    (4) if they do not come with the machine, can I order after the fact? (where? See the next question...)

    (5) I went on the site of Dell parts & upgrades and page "Accessories for your Dell Precision workstations T7910".  There was exactly ONE part available for the 7910, (some strange little video cheap card) see here: accessories.us.dell.com/.../Category.aspx. l = en & cs = 19 & s = dhs & stuff 2999 = & mfgpid = 238987 & tab = parts & stype = 2
    so...

    That is the ONLY part or an upgrade can buy for a Precision 7910 workstation?

    (subquestion: where are the replacement power supplies and memory chips and cables and fans and Procs and disks and Kits of Raid for the 7910?)

    (6) I bought 32 GB DDR4 - 2133 to my 7910 (in a 4X8Go configuration), I can ADD memory later keep my existing and all chips by adding 4 more chips 8 GB for 64 GB? (or they are all must be matched installed chips at the same time like the old days...)

    Thank you!

    Thank you!  (I think...)

    Strange, they would have several distinct Styles of motherboard for the same computer model...

    In the manual for the T7910, they show the double bays memory and dual processor berries...  Why would they not mention that it is only optional and 7910 configurations not all make?  It is very misleading. (He misled me to order the wrong thing!

    (Like a car ad, they show their best setup in the manual and ads too, but they are sure to mention what Optional Configurations are therefore not false advertising - what makes people think that they get things they aren't!

    [url = http://postimg.org/image/s7dq8k8y7/] [img] http://s3.postimg.org/s7dq8k8y7/Untitled_1.jpg [line] [url]

  • AE never use 'double precision FP64' calculation of Visual effects?

    I'm trying to find out if after effects never really use double precision calculate what whether or not. I know the basis of coding video is really ever use it, but I wonder if the particle effects benefit from double precision or if it's mostly to single precision.

    I am currently using a GTX black Titan, which has a good amount of double precision performance, but I don't know if I ever really use it. I'm looking to the new Titan X, which essentially replaces the power of calculation of double-precision with even more unique precision. I especially to create the content of the game in real time and can always benefit from the upgrade of single precision performance, but I also use After effects a good amount and won't lose boosts performance in it. I can get more benefits on the Titan X because that all rendered I do generally is through converters of cpu and no gpu converters, but I do not know what changes After Effects has achieved since CS6.

    Totally irrelevant. Effects like Particle World are not the same hardware accelerated, so what might even be the point on single-precision and double-precision? And for all purposes useful, it is even irrelevant if that were the case - many pixel operations and position related calculations are quantified / integer for which single precision is sufficient. Double-precision really only countries out for complex vector operations where rounding errors for example can mess with for dynamics or similar collision detection.

    Mylenium

  • Since this morning updated (01/11), my policy is so tiny that I can't read anything. This, even after the DOUBLING of the size of my font in tools. Unless this is addressed, I can't use Firefox more, because I don't SEE anything.

    Since this morning updated (01/11), my policy is so tiny that I can't read anything. This, even after the DOUBLING of the size of my font in tools. Unless this is addressed, I can't use Firefox more, because I don't SEE anything.

    I tried NoSquint (looked simpler) and that did the trick... I am now back to where I was before this upgrade. Thank you.

  • How can I remove the double song from my iPhone titles?

    How can I remove the double song from my iPhone titles?

    Hello josephever,

    Thank you for using communities of Apple Support.

    To remove the music from your iPhone, you will need to follow the steps below:

    Remove music

    Remove tracks, albums or playlists in the music app delete all music in the settings.

    Remove the application, music, playlists, albums or songs

    1. Find the song, album, or playlist you want to delete.
    2. Tap the Options icon plus on the right side of the screen.
    3. Press DELETE.
    4. When you are prompted, press Delete [purchased or Playlist] to confirm.

    Delete all the music on your device

    1. Go to settings > general > storage and use iCloud > storage management.
    2. Tap music.
    3. Under the music, by sweeping left on all the songs.
    4. Press DELETE.

    If you delete a purchase that you have not saved on your device, the purchase will also hide your purchase history.

    If you are a member of music from Apple or iTunes subscription game, you might see 'Remove my music' instead of delete. Remove the music from your iPhone, iPad or iPod touch also removes it from your music library to iCloud. If you delete music on a single device, it also deletes other devices. Learn how delete your music to iCloud library media.

    On an iPhone, iPad or iPod touch, if you do not have the music available offline, it is cached by using the available space on the device. The device will delete cache and caching of music, as space is needed by the device.

    Remove music, movies, applications and other content to your iPhone, iPad or iPod touch

    See you soon.

  • How can I configure the double-click on a Magic Mouse 2 without the universal access icon?

    How can I configure the double-click on a Magic Mouse 2 without the universal access icon?

    --> Mouse system preferences.

  • How I have no space on my ipad by storing photos on icloud (and their elimination of the ipad)

    My storage is full on my ipad, I bought an extra storage in icloud.

    I want to "liberate" space on my ipad to store the photos on my icloud and their elimination from the ipad.  Currently I can only store them at a time, which seems to go to the purchase of storage additional icloud.

    any help gratefully received.

    Hi victoriafromswansea,

    Thank you for using communities Support from Apple! If you are currently using iCloud photo library and looking to save space on your iPad, you can find the option optimize the described in the following article useful:

    Can I use iCloud photo library to save space on my device?

    iCloud photo library automatically keeps all of your photos and videos in the original version, in high resolution. Follow these steps to choose how you store your photos and videos on your device:

    • On your iPhone, iPad or iPod touch, tap Settings > iCloud > pictures or settings > Photos & camera, then select a storage parameter.
    • On your Mac, click on Photos > Preferences > iCloud, and select a storage parameter.

    If you turn on [device] Optimize storage, iCloud photo library manages automatically the size of your library on your device, you can make the most of your device storage and access photos more than ever. All of your original photos, full resolution and the videos are stored in iCloud while unit size versions are stored on your device. You can download original photos and videos over Wi - Fi or cell phone when you need it.

    If you turn on download original, iCloud photo library will keep your original, full resolution photos and videos on iCloud and on your device. Download the originals is the default setting for iOS devices with 5 GB free storage plan and all Mac devices.

    You need an Internet connection to access a photo original or video that is stored only in iCloud.

    iCloud Photo library FAQ - Apple Support

    See you soon

  • The Double Tap details to reactivate the display.

    Can someone clarify, do bike G4 + equipped Double tap on the screen informed even as awakening motorcycle screen when the phone has eaten taken?

    Noura says:
    Can someone clarify, do bike G4 + equipped Double tap on the screen informed even as awakening motorcycle screen when the phone has eaten taken?

    I saw something on the double tap to wake up. I have not saw it listed as a function, so I guess that the phone doesn't have the sensors for her.

  • Card PCI-6259 is compatible with the Dell Precision 390?

    Hi all

    I need help in answering this question.  I want to buy a better computer for my data PCI-6259 acquisition card.  I tried to search to see if the card is compatible with the PC and there's previous numbers with this set-up before other users.  Do you have a link to the list of the DAQ cards with tested PC configurations?  I want to just make sure that when I buy the computer, everything will work without problem because I only have one shot at this.

    Thanks to all in advance.

    Kind regards

    justdomechanicalengineering

    Hello

    We do not have a link to specific DAQ board/PC pairings, but the specifications for the Dell Precision 360 indicate that she has three ports PCI 5V which must be compatible with your PCI-6259.

    Best,

    Dan Nelson

    Technical sales engineer

Maybe you are looking for