HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //usr/lib64/python2.6/site-packages/mx/DateTime/mxDateTime/testcomdates.py
from mx.DateTime import *

c = 35000.0
error = 0
for i in range(1000000):
    t = DateTimeFromCOMDate(c)
    tc = t.COMDate()
    if not tc == c:
        print 'failed for: %s (%.16f != %.16f)' % (t,c,tc)
        error = 1
    # Let's give IEEE floats a hard time...
    if i % 10 == 0:
        c = c - 0.009
    else:
        c = c + 0.0099

if not error:
    print 'All went well !'