3 double and time questions

I have 3 questions regarding the double type an time
1. What is the maximum number of decimal places a double value can hold?
2. I have a time string as follows 01:30:21:19F30 which means 1hr 30 mins 21 seconds and 19/30 seconds. I wish to convert this to seconds (of type double)?
3. I then wish to convert the result from question 2 (i.e. the seconds) to the following format hh:mm:ss.s

I have 3 questions regarding the double type an time
1. What is the maximum number of decimal places a
double value can hold?As another poster alluded to, that depends on the scale. The over decimal precision is somewhere in the neighborhood of maybe 15-20 digits. This is because double is 64 base-2 digits (bits) and log base-10 of 2 is 3 plus change, and some of the bits are used to hold scale. If your scale is around 1, then most or all of those digits will be after the decimal point. If your scale is around a million, then six of those digits will be before the decimal point. If you're in the scale of 10^20, none of those digits will lie to the right of the decimal point.
Also note that even if you're around the scale of 1, that doesn't mean that every number can be represented exactly. For example 0.1 in base-10 is a repeated decimal in base-2, just as you can't represent 1/3 exactly in base-10.
What Every Computer Scientist Should Know About Floating-Point Arithmetic

Similar Messages

  • Setting: Date and Time question

    Don't ask but I really just noticed this now since the last clock change in March...
    I changed the time to the correct time but every day it defaults back an hour or really every time I turn it on to use, it defaults back to the wrong time.
    How do you make it display the correct time each time you turn it on? Does it have to do with the option "24 hour clock" being on or off? If the "24 hour clock" is ON, wouldn't that mean that the battery will be running 24/7 even though the switch is turned off to show the red/orange thing? Thanks.

    I see, now I understand. My computer crashed a few years ago and the clock was messed up after I brought it back to life. Maybe that's what it is. And even so, it's the same story with my computer, I fix the clock and Time Zone and it is good for one day only until I turn it off. The clock is wrong the next day.
    Thanks again. Sometimes when I go for a long walk I like to know what time it is - but then again I could always wear my watch.... but with me wearing the sunblcok and sweating, the watch could get dirty.......

  • Integer- double and a question about time

    Hello!
    I have two questions
    1) I have two integers int1 and int2 I want to to int1/int2---> get a number of type 00.0 (double) is there a simple way to achieve this?
    2) I want to get time (just time) of the format 23:01 is there a simple way to achieve this
    Thanks in advance

    1) Yes:
    double frac = (double)int1 / (double)int2;2) Yes: SimpleDateFormat
    Andre

  • Day and time question

    Hi
    I have the following
    Arrival_date Date
    Arrival_time VARCHAR(2) (15)
    Arrival_day VARCHAR(2) (15)
    When the user enter the date in the arrivals date field the other 2 field to be filed with the correct day and system time (I want to make sure that time will be entered in military format HH:MI)
    Thanks,
    Ribhi

    Hello,
    For that I would just store the timestamp once and then use that to convert to whatever you like, otherwise you have the problem of keeping the various columns in sync.
    For example, to get the day of the week from the timestamp, we could -
    jes@DBTEST> select to_char(sysdate, 'DAY') as day from dual;
    DAY
    FRIDAYYou can find a list of useful date/time manipulation techniques here -
    http://www.psoug.org/reference/date_func.html
    Hope this helps,
    John
    http://jes.blogs.shellprompt.net
    http://apex-evangelists.com

  • Difference between two dates and time in hours

    Hi,
    I have fields contains start date, start time, end date, end time.
    How do I calculate the number of hours since start date, start time and end date, end time
    Start date : T_DATE1
    Start time : T_TIME1
    End Date : T_DATE2
    End Time : T_TIME2.
    Please help
    Moderator Message: Date and Time questions are not allowed in this forum. The reason being they have been asked and answered many times here. Please search for relevant information here.
    Edited by: kishan P on Dec 16, 2011 12:02 PM

    Hi,
    Please find the FM - DELTA_TIME_DAY_HOUR,
    this will give you the time in minutes, hence you can convert it to hours.
    Please note the below links;
    Moderator Message: Link-farm removed. Please dont do that again.
    Hope you will search SDN next time, before posting.
    And too hope that this will help you
    Thanks & Regards
    Manu S
    Edited by: kishan P on Dec 16, 2011 12:03 PM

  • The MacBook Pro will not allow me to cut-and-paste to and from or to click-and-drag to the external drive. I can copy-and-paste, but then I must send the original to the trash, which doubles the time and effort. Is there any way to cut-and-paste?

    I have recently switched from a PC to a MacBook Pro.
    I have a large number of documents and photographs on a multiterrabite external drive, backed up on a second multiterrabite external drive.
    Both external drives are formatted for MacIntosh. This has been verified by agents at an Apple store and also at Best Buy in two different cities.
    This is the problem:
    The MacBook Pro will not allow me to cut-and-paste to and from or to click-and-drag to the external drive. I can copy-and-paste, but then I must send the original to the trash, which doubles the time and effort. Is there any way to cut-and-paste?
    Also, the MacBook Pro will not allow me to rename multiple documents or photographs. I can click-and-rename a single one, but this is impossibly time consuming. I can batch-rename in iPhoto, but when I transfer the photographs to the external drive, the rename does not transfer.
    I’m reduced to using my wife’s Toshiba to cut-and-past, rename, and transfer documents. It works perfectly. Is there any way to do this on the MacBook Pro?
    Thanks!
    Roderick Guerry
    [email protected]

    Roderick Guerry wrote:
    The MacBook Pro will not allow me to cut-and-paste to and from or to click-and-drag to the external drive. I can copy-and-paste, but then I must send the original to the trash, which doubles the time and effort. Is there any way to cut-and-paste?
    No, this is a philosophical difference between Apple and Microsoft. Apple believes that it's dangerous to cut a file in case the user never pastes it; in that case the file is lost. Microsoft seems to not have this problem (if I remember Windows correctly) because they don't delete the originating file if it's cut but never pasted.
    Even though Macs have a lot of keyboard shortcuts, philosophically Macs have traditionally been mouse-first. This applies to file copy operations. In your case, what a Mac user would do is open the source window, open the destination window (on your second drive), and then Command-drag the selected files from the source to destination window. This is because a normal drag would leave the originals behind, while adding the Command modifier key tells OS X that this is a Move, not a Copy, so don't leave the originals behind.
    (In addition there are different rules for drag-copying within the same volume or between different volumes. If you drag between two folders on the same volume, the files are moved. If you drag between different volumes, the files are copied unless you hold down Command to delete the copies on the source volume.)
    Roderick Guerry wrote:
    Also, the MacBook Pro will not allow me to rename multiple documents or photographs. I can click-and-rename a single one, but this is impossibly time consuming. I can batch-rename in iPhoto, but when I transfer the photographs to the external drive, the rename does not transfer.
    Two problems in this case. First, batch file renaming is not built into OS X unless you build something with Automator. However, there are many utilities that can do batch file renaming which you can find at macupdate.com or on the App Store. Since I work with media I often batch rename using one of the media managers I have lying around like Media Pro or Adobe Bridge (comes with Photoshop).
    iPhoto is a database front end designed to shield the file system from the consumer and let them concentrate on creativity and sharing. As such it is often a poor choice for managing files directly. When you "transferred the photographs" chances are you moved the originals, not the ones iPhoto edited which are stored in a hidden folder.
    Roderick Guerry wrote:
    I’m reduced to using my wife’s Toshiba to cut-and-past, rename, and transfer documents. It works perfectly. Is there any way to do this on the MacBook Pro?
    There will not be a way to do it exactly like Windows. As described above, there are ways to do it "the Mac way." If it is possible to remove judgment on which way is "better" you might find the Mac way to be acceptable, but of course sometimes we simply prefer what we're used to.

  • Need SAP-HR Module wise Blue prints and Real time questions

    Hi HR Team,
                    can u send me the OM issues and real time questions and any HR module Questions and Blue prints .pls if useful awarded points
    my mail id is [email protected]

    Hi HR Team,
                    can u send me the OM issues and real time questions and any HR module Questions and Blue prints .pls if useful awarded points
    my mail id is [email protected]

  • TS3297 I cannot purchase music currently as I am being asked to answer security questions due to it being " the first time have bought from this PC". This is not the case, I have not changed my PC. I have changed my passowrd and security questions but no

    I cannot buy music currently as I am being asked to answer security questions due to it being supposedly "the first time I have bought form this PC". This is not the case. I have now changed my password and security questions, but it is asking me the same when I try to buy again.

    First off, the name of your computer is only the way it is becuase the Apple user is the first one they created after repairing the Mac. Go into Sharing System Preferences and change the name to whatever you like.
    Can you explain how you did this:
    This didn't seem right so I went in to it and changed the computer so that it would recognise me as the Owner/Administrator.
    You can delete the Apple user in Users & Groups System Prefs. Select that user and delete it. It will ask if you want to save the user data or delete it. If you archive it, you can always delete it later and it will be available if you need to recover that account for some reason--I doubt this will be necessary. After deleting the account, and when you feel you are still working normally, you could delete that archived user folder.
    I have also never seen anything ask for that. It does sound like an Epson thing, but without having access to it, I couldn't tell you for sure.
    Here's what I would try. Create a new User and give them admin rights. Log in as that user and see what happens with the installer. If it still complains, it is an Epson issue. My guess is it is looking for user id 501, the first user created. If it works, then something is indeed odd about your account. If so, use that new admin account to disable Admin privileges for your account, then re-enable it. This is done in the Users & Groups system prefs.

  • Aperture 3 (or plug-in?) and Time Lapse Photo Question

    I have tried to find the answer to this with my google-fu and have had no luck as of yet ... so here goes my question to you mac gurus:
    I am planning on shaving my head/face and then growing my beard and hair untrimmed for several years and doing daily photos to create a time lapse series that can also be added to a slideshow etc. My problem is I want the eyes in the daily photos to line up perfectly for the final resulting slideshow/video. Other this doing this manually hundreds of times I am hoping I can use my mac to help. I have aperture 3 (which I love - great program!). My google searches only come back with cs5 AfterEffects method of doing this. I really do not wish to throw $600+ for this functionality if I can help it.
    Is there a way to do this in Aperture 3? Or Aperture 3 plug-in?
    See youtube link that I found as an example of what I am wanting to do (except on a much, much longer timeline): http://www.youtube.com/watch?v=xbKKsx2xC64
    Thanks!

    If you want to stick to Aperture for this work, you'll have to do it manually. (Aperture is for photo's not for movies and time-lapse is a movie type)

  • Here's a very basic question about 2 TB external drives and Time Machine.

    Here's a very basic question about 2 TB external drives and Time Machine.
    Ihave a Mac Pro with a .75 TB and 1 TB drive.  It also has a 1 TB 2ndinternal drive.  My current external drive is too small so I'll begetting a 1.5 TB or 2 TB drive.
    Obviouslythe new larger 2 TB drive will backup everything on the Mac Prointernal drive with Time Machine.  But there will be 1 TB of space leftover going to waste.
    ShouldI partition the external drive so that the TM portion will be 1 TB andthe use the remaining extra partition for additional file backups withCarbon Copy?
    Thanks for any insights.
    I tried searching around on the new Apple discussion forum, but I find it much harder to use than the old forum I used to use.

    The problem with terabyte drives is that that a 3 TB is about as big as you can get without going into RAID territory. Ideally, a Time Machine drive should be 3 times as large as all the drives you are backing up. So, if you have 2.75 TB of internal storage, you should have 8 TB of Time Machine space.
    Of course, that is "should". If your TB drives are mostly empty, then you can get away with something 3 times the size of your used disk space. Just remember that you are pushing it. Linc is right about Time Machine needing space to work.
    It is unlikely that you have regular churn on 2.75 TB of disk. I suggest identifying which drives and folders have the most activity and excluding those drives and directories that don't change much. It would be better to archive the data that doesn't change often and keep it out of Time Machine. Then you may be able to get away with a 2 TB Time Machine drive.

  • Question about 2 TB external drives and Time Machine.

    Here's a very basic question about 2 TB external drives and Time Machine.
    I have a Mac Pro with a .75 TB and 1 TB drive.  It also has a 1 TB 2nd internal drive.  My current external drive is too small so I'll be getting a 1.5 TB or 2 TB drive.
    Obviously the new larger 2 TB drive will backup everything on the Mac Pro internal drive with Time Machine.  But there will be 1 TB of space left over going to waste.
    Should I partition the external drive so that the TM portion will be 1 TB and the use the remaining extra partition for additional file backups with Carbon Copy?
    Thanks for any insights.
    I tried searching around on the new Apple discussion forum, but I find it much harder to use than the old forum I used to use.

    John,
    I'm not sure why you posted in the iMac forum so I'm going to attempt to get you to the correct spot. I would recommend reposting in the Time Machine Forum, this is part of the OS X forums (Leopard or Snow Leopard) because you are using Snow Leopard (your profile indicates you are) please click Apple Support Communities and type Snow Leopard. Then you can narrow the search down by clicking Refine this List.
    Roger

  • Number doubles in a spry date and time

    Good Afternoon Friends, okay?
    I have a problem that started appearing out of nowhere, next, I have registered several screens and these screens have the date and time fields
    var datatrans01 = new Spry.Widget.ValidationTextField (datatrans01 "," date ", (format:" dd / mm / yyyy ", validateOn: [" blur "], useCharacterMasking: true));
    I do not know what happens every time I type a number doubles it, type I type 1 and he puts 11, already happened to you,
    thanks
    Juliaob

    var datatrans01 = new Spry.Widget.ValidationTextField (datatrans01 "," date ", (format:" dd / mm / yyyy ", validateOn: [" blur "], useCharacterMasking: true));
    Hi,
    There are no quotation marks in front of datatrans and the normal brackets (coloured red) should be curly brackets.
    If you use the following constructor you should be fine assuming that the rest of your markup is OK
    var datatrans01 = new Spry.Widget.ValidationTextField("datatrans01", "date", {format:"dd/mm/yyyy", validateOn:["blur"], useCharacterMasking:true});
    I hope this helps.
    Ben

  • Date and time stamp question

    Is there a way to drag the "date and time stamp" to my project all at once, or do I have to continue to drag it to each individual section of my project?
    Thanks

    Hi,
    I don't find any function module, but it does'nt really hard to code this using DIV and MOD instructions :
    If you've got your time in seconds :
    w_day = w_time DIV 86400.
    w_mod = w_time MOD 86400.
    w_hour = w_mod DIV 3600.
    w_mod = w_mod MOD 3600.
    It doesn't seem too bad in term of performance....
    Mathieu

  • Snow Leopard and Time Machine question

    Running on snow leopard, trying back up files in order to upgrade OS using an external hard drive and time machine. Previously said "don't use" on accident with this hard drive; any way to reverse this?

    Hello cinstar,
    The following article provides steps for setting up Time Machine. The process of choosing a drive should not omit any drives that have been previously 'ignored' when first connected.
    Mac OS X 10.6: Setting up and adjusting Time Machine
    http://support.apple.com/kb/PH6299
    Cheers,
    Allen

  • Question about Date and Time formulas

    Hi, I am new to Numbers, former Excel user. I have been able to use Numbers fine until I got stuck in trying to calculate paces. I am a triathlon coach and use pace for running. In Excel I could type pace in as a product of time. So if I want it to show 7:45, I would use date and time and punch in 12:07:45 and it would show up as 7:45. Then in the cells below, I could take that 7:45 cell and divide "/" by .8, etc and it would produce another pace (7:34 for example).
    When I try the same thing in Numbers, it will produce the 7:45 by punching in 12:07:45, but it will not let me divide of multiply. It gives me the triangle and says "the operator / expects a number, but found 7:45. And will not divide or multiply. Anyone know a way around this?

    kource,
    Go to the Inspector and set the cell format to "Duration", with the units set to "Minutes".
    Now, the cell value will appear "7:45", and when you set an adjacent cell and set it to .8 of this one, its value will be "6:12" (that is, 7:45 = 465 seconds; .8 of 465 is 372 seconds, or 6:12).
    This is what you're looking for, correct?
    Cheers,
    Larry

Maybe you are looking for

  • EVENT PROGRAMING

    Hi This is a u201Cgoods received noteu201D Program . In this actualy We no need to keep button , because we are going to run this Application in dos mode through telenet via shell in mobile device. Now we configured everything but in dos mode buttons

  • ACCOUNTING FOR ACTUAL AND ESTIMATED OVERHEADs

    Hi I have some basic questions about the accounting flow for actual and applied OVERHEADs in SAP, When I receive the goods from production I credit Cost Of Goods Manufactured (Mat CostOHProcess Cost+ Prod Cost) 1. How does the accounting entry flow i

  • Is it possible to extract a full VR panorama  image from a QuickTime movie?

    I have created several panoramas - usually 180 to 230 degrees each - and saved them in QuickTime mov format. Is it possible to export/extract the full image from the .mov as a JPG, or TIF(F)using QuickTime Pro or some other program? The QuickTime Vie

  • PROBLEM IN ACTIVATING BB WITH ANOTHER SERVICE PROVIDER

    Hi !!! i had purchased BB from tata indicom , recently i changed service provider from tataindicom to idea with Number portability option ... no. is same but idea is not able to register my BB with there services .....please guide me. rishiraj

  • Fix_column in ALV

    hi all, I have some problems while trying to set the fix_column option of ALV grid and tree ... I set this value in catalogue, but it seems it doesn't work, so can anybody please post me a piece of code he/she knows it works because he/she used with