bugGNU Octave - Bugs: bug #60647, datevec(730972.1249999999)

 
 

bug #60647: datevec(730972.1249999999)

Submitted by:  Muhali <muhali>
Submitted on:  Thu 20 May 2021 12:03:24 PM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  6.2.0 Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 20 May 2021 03:21:34 PM UTC, comment #1: 

This is very similar to bug #59979.
Matlab seems to (arbitrarily?) impose a limit to the precision of input to date functions.

I'm still undecided if that is a good thing or not.

The output for me with Octave 6.2.0 on Windows:

>> datevec(730972.1249999999)
ans =

   2.0010e+03   5.0000e+00   1.0000e+00   2.0000e+00   5.9000e+01   6.0000e+01

>> ans(end)-60
ans = -1.5259e-05

The given time corresponds to approximately 15 µs before 3 am on 2001-May-01. So, technically that isn't at 3 am yet...

Markus Mützel <mmuetzel>
Project Member
Thu 20 May 2021 12:03:24 PM UTC, original submission:  

For the command in the subject, octave produces

octave> datevec(730972.1249999999)
ans =

 2001 5 1 2 59 60

whereas Matlab gives

>> datevec(730972.1249999999)


ans =

        2001           5           1           3           0           0

Muhali <muhali>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by muhali (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-20 mmuetzel CategoryNone => Interpreter
        Item GroupNone => Matlab Compatibility
        StatusNone => Confirmed
        Operating SystemGNU/Linux => Any

    Back to the top


    Powered by Savane 3.6