3 # Tests the expression optimizer and evaluator.
5 TEMPDIR=/tmp/pspp-tst-$$
7 # ensure that top_builddir are absolute
8 if [ -z "$top_builddir" ] ; then top_builddir=. ; fi
9 if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi
10 top_builddir=`cd $top_builddir; pwd`
11 PSPP=$top_builddir/src/ui/terminal/pspp
13 # ensure that top_srcdir is absolute
14 top_srcdir=`cd $top_srcdir; pwd`
16 STAT_CONFIG_PATH=$top_srcdir/config
17 export STAT_CONFIG_PATH
22 if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then
23 echo "NOT cleaning $TEMPDIR"
57 activity="create expressions list"
58 sed -ne 's/#.*//;/^[ ]*$/!p' > $TEMPDIR/expr-list <<'EOF'
66 # Test using numeric/string values as Booleans and vice-versa
71 2 OR $sysmis => sysmis
72 2 AND $sysmis => false
73 'string' AND $sysmis => error
74 0 AND $sysmis => false
76 $true + $false => 1.00
78 # Addition and subtraction.
82 7676 + $sysmis => sysmis
84 ('foo') + ('bar') => error # Arithmetic concatenation requires CONCAT.
85 'foo' + 'bar' => "foobar" # Lexical concatentation succeeds.
86 1 +3 - 2 +4 -5 => 1.00
89 'string' - 1e10 => error
94 # Multiplication and division
100 $sysmis * 15 => sysmis
108 (2**3)**4 => 4096.00 # Irritating, but compatible.
122 $false AND $false => false
123 $false AND $true => false
124 $false AND $sysmis => false
125 $true AND $false => false
126 $true AND $true => true
127 $true AND $sysmis => sysmis
128 $sysmis AND $false => false
129 $sysmis AND $true => sysmis
130 $sysmis AND $sysmis => sysmis
131 $false & $false => false
132 $false & $true => false
133 $false & $sysmis => false
134 $true & $false => false
135 $true & $true => true
136 $true & $sysmis => sysmis
137 $sysmis & $false => false
138 $sysmis & $true => sysmis
139 $sysmis & $sysmis => sysmis
142 $false OR $false => false
143 $false OR $true => true
144 $false OR $sysmis => sysmis
145 $true OR $false => true
146 $true OR $true => true
147 $true OR $sysmis => true
148 $sysmis OR $false => sysmis
149 $sysmis OR $true => true
150 $sysmis OR $sysmis => sysmis
151 $false | $false => false
152 $false | $true => true
153 $false | $sysmis => sysmis
154 $true | $false => true
155 $true | $true => true
156 $true | $sysmis => true
157 $sysmis | $false => sysmis
158 $sysmis | $true => true
159 $sysmis | $sysmis => sysmis
167 not $sysmis => sysmis
175 # Relational operators.
180 1 eq 'foobar' => error
181 5 eq 'foobar' => error
183 'quux' = 5.55 => error
184 'foobar' = 'foobar' => true
185 'quux' = 'bar' => false
186 'bar ' = 'bar' => true
187 'asdf ' = 'asdf ' => true
188 'asdfj ' = 'asdf' => false
189 1 + 2 = 3 => true # Check precedence.
190 1 >= 2 = 2 ge 3 => false # Check precedence.
191 3 ne 2 ~= 1 => false # Mathematically true.
192 3 > 2 > 1 => false # Mathematically true.
199 2 < = 2 => error # Make sure <= token can't be split.
200 1 <= 'foobar' => error
201 5 <= 'foobar' => error
203 'quux' <= 5.55 => error
204 '0123' <= '0123' => true
205 '0123' <= '0124' => true
206 '0124' le '0123' => false
207 '0123 ' <= '0123' => true
208 '0123' le '0123 ' => true
214 1 lt 'foobar' => error
215 5 lt 'foobar' => error
217 'quux' < 5.55 => error
218 '0123' lt '0123' => false
219 '0123' < '0124' => true
220 '0124' lt '0123' => false
221 '0123 ' < '0123' => false
222 '0123' lt '0123 ' => false
229 2 > = 2 => error # Make sure >= token can't be split.
230 1 >= 'foobar' => error
231 5 ge 'foobar' => error
233 'quux' >= 5.55 => error
234 '0123' ge '0123' => true
235 '0123' >= '0124' => false
236 '0124' >= '0123' => true
237 '0123 ' ge '0123' => true
238 '0123' >= '0123 ' => true
244 1 gt 'foobar' => error
245 5 gt 'foobar' => error
247 'quux' > 5.55 => error
248 '0123' gt '0123' => false
249 '0123' > '0124' => false
250 '0124' gt '0123' => true
251 '0123 ' > '0123' => false
252 '0123' gt '0123 ' => false
258 1 ~= 'foobar' => error
259 5 <> 'foobar' => error
261 'quux' ~= 5.55 => error
262 'foobar' <> 'foobar' => false
263 'quux' ne 'bar' => true
264 'bar ' <> 'bar' => false
265 'asdf ' ~= 'asdf ' => false
266 'asdfj ' ne 'asdf' => true
267 1 < > 1 => error # <> token can't be split
268 1 ~ = 1 => error # ~= token can't be split
288 mod(-55.5, 2) => -1.50
289 mod(55.5, -2) => 1.50
290 mod(-55.5, -2) => -1.50
293 mod('a', 'b') => error
296 mod10(-55.5) => -5.50
311 acos(.5) / 3.14159 * 180 => 60.00
312 arcos(.75) / 3.14159 * 180 => 41.41
313 arcos(-.5) / 3.14159 * 180 => 120.00
314 acos(-.75) / 3.14159 * 180 => 138.59
315 acos(-1) / 3.14159 * 180 => 180.00
316 arcos(1) / 3.14159 * 180 => 0.00
317 acos(-1.01) => sysmis
318 arcos(1.01) => sysmis
321 arsin(.5) / 3.14159 * 180 => 30.00
322 asin(.25) / 3.14159 * 180 => 14.48
323 arsin(-.5) / 3.14159 * 180 => -30.00
324 asin(-.25) / 3.14159 * 180 => -14.48
325 arsin(-1.01) => sysmis
329 artan(1) / 3.14159 * 180 => 45.00
330 atan(10) / 3.14159 * 180 => 84.29
331 artan(-1) / 3.14159 * 180 => -45.00
332 atan(-10) / 3.14159 * 180 => -84.29
335 cos(60 / 180 * 3.14159) => 0.50
336 cos(45 / 180 * 3.14159) => 0.71
337 cos(30 / 180 * 3.14159) => 0.87
338 cos(15 / 180 * 3.14159) => 0.97
339 cos(-60 / 180 * 3.14159) => 0.50
340 cos(-45 / 180 * 3.14159) => 0.71
341 cos(-30 / 180 * 3.14159) => 0.87
342 cos(-15 / 180 * 3.14159) => 0.97
343 cos(123 / 180 * 3.14159) => -0.54
344 cos(321 / 180 * 3.14159) => 0.78
347 sin(60 / 180 * 3.14159) => 0.87
348 sin(45 / 180 * 3.14159) => 0.71
349 sin(30 / 180 * 3.14159) => 0.50
350 sin(15 / 180 * 3.14159) => 0.26
351 sin(-60 / 180 * 3.14159) => -0.87
352 sin(-45 / 180 * 3.14159) => -0.71
353 sin(-30 / 180 * 3.14159) => -0.50
354 sin(-15 / 180 * 3.14159) => -0.26
355 sin(123 / 180 * 3.14159) => 0.84
356 sin(321 / 180 * 3.14159) => -0.63
359 tan(60 / 180 * 3.14159) => 1.73
360 tan(45 / 180 * 3.14159) => 1.00
361 tan(30 / 180 * 3.14159) => 0.58
362 tan(15 / 180 * 3.14159) => 0.27
363 tan(-60 / 180 * 3.14159) => -1.73
364 tan(-45 / 180 * 3.14159) => -1.00
365 tan(-30 / 180 * 3.14159) => -0.58
366 tan(-15 / 180 * 3.14159) => -0.27
367 tan(123 / 180 * 3.14159) => -1.54
368 tan(321 / 180 * 3.14159) => -0.81
371 # FIXME: a variable name as the argument to SYSMIS is a special case
372 # that we don't yet test. We also can't test VALUE this way.
374 missing($sysmis) => true
375 missing(asin(1.01)) => true
376 missing(asin(.5)) => false
377 missing(' ') => error
378 nmiss($sysmis) => 1.00
380 nmiss($sysmis, $sysmis, $sysmis) => 3.00
381 nmiss(1, 2, 3, 4) => 0.00
382 nmiss(1, $sysmis, $sysmis, 2, 2, $sysmis, $sysmis, 3, 4) => 4.00
383 nvalid($sysmis) => 0.00
385 nvalid($sysmis, $sysmis, $sysmis) => 0.00
386 nvalid(1, 2, 3, 4) => 4.00
387 nvalid(1, $sysmis, $sysmis, 2, 2, $sysmis, $sysmis, 3, 4) => 5.00
389 sysmis($sysmis) => true
390 sysmis(asin(1.01)) => true
391 sysmis(asin(.5)) => false
394 any($sysmis, 1, $sysmis, 3) => sysmis
395 any(1, 1, 2, 3) => true
396 any(1, $true, 2, 3) => true
397 any(1, $false, 2, 3) => false
398 any(2, 1, 2, 3) => true
399 any(3, 1, 2, 3) => true
400 any(5, 1, 2, 3) => false
401 any(1, 1, 1, 1) => true
402 any($sysmis, 1, 1, 1) => sysmis
403 any(1, $sysmis, $sysmis, $sysmis) => sysmis
404 any($sysmis, $sysmis, $sysmis, $sysmis) => sysmis
406 any('1', 2, 3, 4) => error
407 any(1, '2', 3, 4) => error
408 any(1, 2, '3', 4) => error
409 any(1, 2, 3, '4') => error
411 any('', 'a', '', 'c') => true
412 any('a', 'a', 'b', 'c') => true
413 any('b', 'a', 'b', 'c') => true
414 any('c', 'a', 'b', 'c') => true
415 any('e', 'a', 'b', 'c') => false
416 any('a', 'a', 'a', 'a') => true
417 any('', 'a', 'a', 'a') => false
418 any('a', '', '', '') => false
420 any('a', 'a ', 'b', 'c') => true
421 any('b ', 'a', 'b', 'c') => true
422 any('c ', 'a', 'b', 'c ') => true
423 any(a, 'b', 'c', 'd') => error
424 any('a', b, 'c', 'd') => error
425 any('a', 'b', c, 'd') => error
426 any('a', 'b', 'c', d) => error
428 range(5, 1, 10) => true
429 range(1, 1, 10) => true
430 range(10, 1, 10) => true
431 range(-1, 1, 10) => false
432 range(12, 1, 10) => false
433 range($sysmis, 1, 10) => sysmis
434 range(5, 1, $sysmis) => sysmis
435 range(5, $sysmis, 10) => sysmis
436 range($sysmis, $sysmis, 10) => sysmis
437 range($sysmis, 1, $sysmis) => sysmis
438 range($sysmis, $sysmis, $sysmis) => sysmis
439 range(0, 1, 8, 10, 18) => false
440 range(1, 1, 8, 10, 18) => true
441 range(6, 1, 8, 10, 18) => true
442 range(8, 1, 8, 10, 18) => true
443 range(9, 1, 8, 10, 18) => false
444 range(10, 1, 8, 10, 18) => true
445 range(13, 1, 8, 10, 18) => true
446 range(16, 1, 8, 10, 18) => true
447 range(18, 1, 8, 10, 18) => true
448 range(20, 1, 8, 10, 18) => false
451 range(1, 2, 3, 4) => error
452 range(1, 2, 3, 4, 5, 6) => error
453 range('1', 2, 3) => error
454 range(1, '2', 3) => error
455 range(1, 2, '3') => error
457 range('123', '111', '888') => true
458 range('111', '111', '888') => true
459 range('888', '111', '888') => true
460 range('110', '111', '888') => false
461 range('889', '111', '888') => false
462 range('000', '111', '888') => false
463 range('999', '111', '888') => false
464 range('123 ', '111', '888') => true
465 range('123', '111 ', '888') => true
466 range('123', '111', '888 ') => true
467 range('123', '111 ', '888 ') => true
468 range('00', '01', '08', '10', '18') => false
469 range('01', '01', '08', '10', '18') => true
470 range('06', '01', '08', '10', '18') => true
471 range('08', '01', '08', '10', '18') => true
472 range('09', '01', '08', '10', '18') => false
473 range('10', '01', '08', '10', '18') => true
474 range('15', '01', '08', '10', '18') => true
475 range('18', '01', '08', '10', '18') => true
476 range('19', '01', '08', '10', '18') => false
478 range('1', '2') => error
479 range('1', '2', '3', '4') => error
480 range('1', '2', '3', '4', '5', '6') => error
481 range(1, '2', '3') => error
482 range('1', 2, '3') => error
483 range('1', '2', 3) => error
485 cfvar(1, 2, 3, 4, 5) => 0.53
486 cfvar(1, $sysmis, 2, 3, $sysmis, 4, 5) => 0.53
489 cfvar(1, $sysmis) => sysmis
490 cfvar(1, 2, 3, $sysmis) => 0.50
491 cfvar.4(1, 2, 3, $sysmis) => sysmis
492 cfvar.4(1, 2, 3) => error
494 cfvar('x', 1, 2, 3) => error
496 max(1, 2, 3, 4, 5) => 5.00
497 max(1, $sysmis, 2, 3, $sysmis, 4, 5) => 5.00
501 max(1, $sysmis) => 1.00
502 max(1, 2, 3, $sysmis) => 3.00
503 max.4(1, 2, 3, $sysmis) => sysmis
504 max.4(1, 2, 3) => error
506 max("2", "3", "5", "1", "4") => "5"
510 mean(1, 2, 3, 4, 5) => 3.00
511 mean(1, $sysmis, 2, 3, $sysmis, 4, 5) => 3.00
515 mean(1, $sysmis) => 1.00
516 mean(1, 2, 3, $sysmis) => 2.00
517 mean.4(1, 2, 3, $sysmis) => sysmis
518 mean.4(1, 2, 3) => error
520 min(1, 2, 3, 4, 5) => 1.00
521 min(1, $sysmis, 2, 3, $sysmis, 4, 5) => 1.00
525 min(1, $sysmis) => 1.00
526 min(1, 2, 3, $sysmis) => 1.00
527 min.4(1, 2, 3, $sysmis) => sysmis
528 min.4(1, 2, 3) => error
530 min("2", "3", "5", "1", "4") => "1"
534 sd(1, 2, 3, 4, 5) => 1.58
535 sd(1, $sysmis, 2, 3, $sysmis, 4, 5) => 1.58
538 sd(1, $sysmis) => sysmis
539 sd(1, 2, 3, $sysmis) => 1.00
540 sd.4(1, 2, 3, $sysmis) => sysmis
541 sd.4(1, 2, 3) => error
543 sd('x', 1, 2, 3) => error
545 sum(1, 2, 3, 4, 5) => 15.00
546 sum(1, $sysmis, 2, 3, $sysmis, 4, 5) => 15.00
550 sum(1, $sysmis) => 1.00
551 sum(1, 2, 3, $sysmis) => 6.00
552 sum.4(1, 2, 3, $sysmis) => sysmis
553 sum.4(1, 2, 3) => error
555 variance(1, 2, 3, 4, 5) => 2.50
556 variance(1, $sysmis, 2, 3, $sysmis, 4, 5) => 2.50
557 variance(1, 2) => 0.50
559 variance(1, $sysmis) => sysmis
560 variance(1, 2, 3, $sysmis) => 1.00
561 variance.4(1, 2, 3, $sysmis) => sysmis
562 variance.4(1, 2, 3) => error
563 variance('x') => error
564 variance('x', 1, 2, 3) => error
567 concat('a', 'b') => "ab"
568 concat('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') => "abcdefgh"
569 concat('abcdefgh', 'ijklmnopq') => "abcdefghijklmnopq"
570 concat('a', 1) => error
571 concat(1, 2) => error
573 index('abcbcde', 'bc') => 2.00
574 index('abcbcde', 'bcd') => 4.00
575 index('abcbcde', 'bcbc') => 2.00
576 index('abcdefgh', 'abc') => 1.00
577 index('abcdefgh', 'bcd') => 2.00
578 index('abcdefgh', 'cde') => 3.00
579 index('abcdefgh', 'def') => 4.00
580 index('abcdefgh', 'efg') => 5.00
581 index('abcdefgh', 'fgh') => 6.00
582 index('abcdefgh', 'fghi') => 0.00
583 index('abcdefgh', 'x') => 0.00
584 index('abcdefgh', 'abch') => 0.00
585 index('banana', 'na') => 3.00
586 index('banana', 'ana') => 2.00
587 index('', 'x') => 0.00
588 index('', '') => sysmis
589 index('abcdefgh', '') => sysmis
590 index('abcdefgh', 'alkjsfdjlskalkjfa') => 0.00
592 index('abcbcde', 'bc', 1) => 2.00
593 index('abcbcde', 'dc', 1) => 3.00
594 index('abcbcde', 'abc', 1) => 1.00
595 index('abcbcde', 'bc', 2) => 2.00
596 index('abcbcde', 'dc', 2) => 0.00
597 index('abcbcde', 'abc', 1) => 1.00
598 index('abcbcde', 'bccb', 2) => 2.00
599 index('abcbcde', 'bcbc', 2) => 2.00
600 index('abcbcde', 'bcbc', $sysmis) => sysmis
602 rindex('abcbcde', 'bc') => 4.00
603 rindex('abcbcde', 'bcd') => 4.00
604 rindex('abcbcde', 'bcbc') => 2.00
605 rindex('abcdefgh', 'abc') => 1.00
606 rindex('abcdefgh', 'bcd') => 2.00
607 rindex('abcdefgh', 'cde') => 3.00
608 rindex('abcdefgh', 'def') => 4.00
609 rindex('abcdefgh', 'efg') => 5.00
610 rindex('abcdefgh', 'fgh') => 6.00
611 rindex('abcdefgh', 'fghi') => 0.00
612 rindex('abcdefgh', 'x') => 0.00
613 rindex('abcdefgh', 'abch') => 0.00
614 rindex('banana', 'na') => 5.00
615 rindex('banana', 'ana') => 4.00
616 rindex('', 'x') => 0.00
617 rindex('', '') => sysmis
618 rindex('abcdefgh', '') => sysmis
619 rindex('abcdefgh', 'alkjsfdjlskalkjfa') => 0.00
621 rindex('abcbcde', 'bc', 1) => 5.00
622 rindex('abcbcde', 'dc', 1) => 6.00
623 rindex('abcbcde', 'abc', 1) => 5.00
624 rindex('abcbcde', 'bc', 2) => 4.00
625 rindex('abcbcde', 'dc', 2) => 0.00
626 rindex('abcbcde', 'abc', 1) => 5.00
627 rindex('abcbcde', 'bccb', 2) => 4.00
628 rindex('abcbcde', 'bcbc', 2) => 4.00
629 rindex('abcbcde', 'bcbc', $sysmis) => sysmis
630 rindex('abcbcde', 'bcbcg', 2) => sysmis
631 rindex('abcbcde', 'bcbcg', $sysmis) => sysmis
632 rindex('abcbcde', 'bcbcg', 'x') => error
633 rindex(1, 'bcdfkjl', 2) => error
634 rindex('aksj', 2, 2) => error
635 rindex(1, 2, 3) => error
636 rindex(1, 2, '3') => error
641 length('adsf ') => 8.00
642 length('abcdefghijkl') => 12.00
644 length($sysmis) => error
646 lower('ABCDEFGHIJKLMNOPQRSTUVWXYZ!@%&*(089') => "abcdefghijklmnopqrstuvwxyz!@%&*(089"
650 lpad('abc', -1) => ""
651 lpad('abc', 0) => "abc"
652 lpad('abc', 2) => "abc"
653 lpad('abc', 3) => "abc"
654 lpad('abc', 10) => " abc"
655 lpad('abc', 32768) => ""
656 lpad('abc', $sysmis) => ""
657 lpad('abc', -1, '*') => ""
658 lpad('abc', 0, '*') => "abc"
659 lpad('abc', 2, '*') => "abc"
660 lpad('abc', 3, '*') => "abc"
661 lpad('abc', 10, '*') => "*******abc"
662 lpad('abc', 32768, '*') => ""
663 lpad('abc', $sysmis, '*') => ""
664 lpad('abc', $sysmis, '') => ""
665 lpad('abc', $sysmis, 'xy') => ""
667 lpad('abc', 'def') => error
668 lpad(0, 10, ' ') => error
669 lpad('abc', 'def', ' ') => error
670 lpad('x', 5, 0) => error
671 lpad('x', 5, 2) => error
673 number("123", f3.0) => 123.00
674 number(" 123", f3.0) => 12.00
675 number("123", f3.1) => 12.30
676 number(" ", f3.1) => sysmis
677 number("123", a8) => error
678 number("123", cca1.2) => error # CCA is not an input format
680 ltrim(' abc') => "abc"
681 rtrim(' abc ') => " abc"
682 ltrim('abc') => "abc"
683 ltrim(' abc') => " abc"
687 ltrim('***abc', '*') => "abc"
688 ltrim('abc', '*') => "abc"
689 ltrim('*abc', '*') => "abc"
691 ltrim(8, '*') => error
692 ltrim(' x', 8) => error
695 rpad('abc', -1) => ""
696 rpad('abc', 0) => "abc"
697 rpad('abc', 2) => "abc"
698 rpad('abc', 3) => "abc"
699 rpad('abc', 10) => "abc "
700 rpad('abc', 32768) => ""
701 rpad('abc', $sysmis) => ""
702 rpad('abc', -1, '*') => ""
703 rpad('abc', 0, '*') => "abc"
704 rpad('abc', 2, '*') => "abc"
705 rpad('abc', 3, '*') => "abc"
706 rpad('abc', 10, '*') => "abc*******"
707 rpad('abc', 32768, '*') => ""
708 rpad('abc', $sysmis, '*') => ""
709 rpad('abc', $sysmis, '') => ""
710 rpad('abc', $sysmis, 'xy') => ""
712 rpad('abc', 'def') => error
713 rpad(0, 10, ' ') => error
714 rpad('abc', 'def', ' ') => error
715 rpad('x', 5, 0) => error
716 rpad('x', 5, 2) => error
718 rtrim('abc ') => "abc"
719 rtrim(' abc ') => " abc"
720 rtrim('abc') => "abc"
721 rtrim('abc ') => "abc "
725 rtrim('abc***', '*') => "abc"
726 rtrim('abc', '*') => "abc"
727 rtrim('abc*', '*') => "abc"
729 rtrim(8, '*') => error
730 rtrim(' x', 8) => error
733 string(123.56, f5.1) => "123.6"
734 string($sysmis, f5.1) => " . "
735 string("abc", A5) => error
736 string(123, e1) => error # E has a minimum width of 6 on output.
737 string(123, e6.0) => "1E+002"
739 substr('abcdefgh', -5) => ""
740 substr('abcdefgh', 0) => ""
741 substr('abcdefgh', 1) => "abcdefgh"
742 substr('abcdefgh', 3) => "cdefgh"
743 substr('abcdefgh', 5) => "efgh"
744 substr('abcdefgh', 6) => "fgh"
745 substr('abcdefgh', 7) => "gh"
746 substr('abcdefgh', 8) => "h"
747 substr('abcdefgh', 9) => ""
748 substr('abcdefgh', 10) => ""
749 substr('abcdefgh', 20) => ""
750 substr('abcdefgh', $sysmis) => ""
751 substr(0, 10) => error
752 substr('abcd', 'abc') => error
753 substr(0, 'abc') => error
755 substr('abcdefgh', 0, 0) => ""
756 substr('abcdefgh', 3, 0) => ""
757 substr('abcdefgh', 5, 0) => ""
758 substr('abcdefgh', 9, 0) => ""
759 substr('abcdefgh', 0, 1) => ""
760 substr('abcdefgh', 0, 5) => ""
761 substr('abcdefgh', 1, 8) => "abcdefgh"
762 substr('abcdefgh', 1, 10) => "abcdefgh"
763 substr('abcdefgh', 1, 20) => "abcdefgh"
764 substr('abcdefgh', 3, 4) => "cdef"
765 substr('abcdefgh', 5, 2) => "ef"
766 substr('abcdefgh', 6, 1) => "f"
767 substr('abcdefgh', 7, 10) => "gh"
768 substr('abcdefgh', 8, 1) => "h"
769 substr('abcdefgh', 8, 2) => "h"
770 substr('abcdefgh', 9, 11) => ""
771 substr('abcdefgh', 10, 52) => ""
772 substr('abcdefgh', 20, 1) => ""
773 substr('abcdefgh', $sysmis, 2) => ""
774 substr('abcdefgh', 9, $sysmis) => ""
775 substr('abcdefgh', $sysmis, $sysmis) => ""
776 substr('abc', 1, 'x') => error
777 substr(0, 10, 1) => error
778 substr(0, 10, 'x') => error
779 substr('abcd', 'abc', 0) => error
780 substr('abcd', 'abc', 'j') => error
781 substr(0, 'abc', 4) => error
782 substr(0, 'abc', 'k') => error
784 upcase('abcdefghijklmnopqrstuvwxyz!@%&*(089') => "ABCDEFGHIJKLMNOPQRSTUVWXYZ!@%&*(089"
788 time.days(1) => 86400.00
789 time.days(-1) => -86400.00
790 time.days(0.5) => 43200.00
791 time.days('x') => error
792 time.days($sysmis) => sysmis
794 time.hms(4,50,38) => 17438.00
795 time.hms(12,31,35) => 45095.00
796 time.hms(12,47,53) => 46073.00
797 time.hms(1,26,0) => 5160.00
798 time.hms(20,58,11) => 75491.00
799 time.hms(7,36,5) => 27365.00
800 time.hms(15,43,49) => 56629.00
801 time.hms(4,25,9) => 15909.00
802 time.hms(6,49,27) => 24567.00
803 time.hms(2,57,52) => 10672.00
804 time.hms(16,45,44) => 60344.00
805 time.hms(21,30,57) => 77457.00
806 time.hms(22,30,4) => 81004.00
807 time.hms(1,56,51) => 7011.00
808 time.hms(5, 6, 7) => 18367.00
809 time.hms(5, 6, 0) => 18360.00
810 time.hms(5, 0, 7) => 18007.00
811 time.hms(0, 6, 7) => 367.00
812 time.hms(-5, 6, -7) => sysmis
813 time.hms(-5, 5, -7) => sysmis
814 time.hms($sysmis, 6, 7) => sysmis
815 time.hms(5, $sysmis, 7) => sysmis
816 time.hms(5, $sysmis, 7) => sysmis
817 time.hms($sysmis, $sysmis, 7) => sysmis
818 time.hms(5, $sysmis, $sysmis) => sysmis
819 time.hms($sysmis, $sysmis, 7) => sysmis
820 time.hms($sysmis, $sysmis, $sysmis) => sysmis
822 ctime.days(106272) => 1.23
823 ctime.hours(106272) => 29.52
824 ctime.minutes(106272) => 1771.20
825 ctime.seconds(106272) => 106272.00
826 ctime.days(-106272) => -1.23
827 ctime.hours(-106272) => -29.52
828 ctime.minutes(-106272) => -1771.20
829 ctime.seconds(-106272) => -106272.00
830 ctime.days($sysmis) => sysmis
831 ctime.hours($sysmis) => sysmis
832 ctime.minutes($sysmis) => sysmis
833 ctime.seconds($sysmis) => sysmis
834 ctime.days('a') => error
835 ctime.hours('b') => error
836 ctime.minutes('c') => error
837 ctime.seconds('d') => error
839 ctime.days(date.dmy(15,10,1582)) => 1.00
840 ctime.days(date.dmy(6,9,1719)) => 50000.00
841 ctime.days(date.dmy(24,1,1583)) => 102.00
842 ctime.days(date.dmy(14,12,1585)) => 1157.00
843 ctime.days(date.dmy(26,11,1621)) => 14288.00
844 ctime.days(date.dmy(25,12,1821)) => 87365.00
845 ctime.days(date.dmy(3,12,1882)) => 109623.00
846 ctime.days(date.dmy(6,4,2002)) => 153211.00
847 ctime.days(date.dmy(19,12,1999)) => 152372.00
848 ctime.days(date.dmy(1,10,1978)) => 144623.00
849 ctime.days(date.dmy(0,10,1978)) => 144622.00
850 ctime.days(date.dmy(32,10,1978)) => sysmis
851 ctime.days(date.dmy(31,0,1978)) => 144349.00
852 ctime.days(date.dmy(31,13,1978)) => 144745.00
853 ctime.days(date.dmy($sysmis,10,1978)) => sysmis
854 ctime.days(date.dmy(31,$sysmis,1978)) => sysmis
855 ctime.days(date.dmy(31,10,$sysmis)) => sysmis
856 ctime.days(date.dmy($sysmis,$sysmis,1978)) => sysmis
857 ctime.days(date.dmy(31,$sysmis,$sysmis)) => sysmis
858 ctime.days(date.dmy($sysmis,10,$sysmis)) => sysmis
859 ctime.days(date.dmy($sysmis,$sysmis,$sysmis)) => sysmis
860 date.dmy('a',1,2) => error
861 date.dmy(1,'a',2) => error
862 date.dmy(1,2,'a') => error
863 # FIXME: check out-of-range and nearly out-of-range values
865 yrmoda(1582,10,15) => 1.00
866 yrmoda(1719,9,6) => 50000.00
867 yrmoda(1583,1,24) => 102.00
868 yrmoda(1585,12,14) => 1157.00
869 yrmoda(1621,11,26) => 14288.00
870 yrmoda(1821,12,25) => 87365.00
871 yrmoda(1882,12,3) => 109623.00
872 yrmoda(2002,4,6) => 153211.00
873 yrmoda(1999,12,19) => 152372.00
874 yrmoda(1978,10,1) => 144623.00
875 yrmoda(1978,10,0) => 144622.00
876 yrmoda(1978,10,32) => sysmis
877 yrmoda(1978,0,31) => 144349.00
878 yrmoda(1978,13,31) => 144745.00
879 yrmoda(1978,10,$sysmis) => sysmis
880 yrmoda(1978,$sysmis,31) => sysmis
881 yrmoda($sysmis,10,31) => sysmis
882 yrmoda(1978,$sysmis,$sysmis) => sysmis
883 yrmoda($sysmis,$sysmis,31) => sysmis
884 yrmoda($sysmis,10,$sysmis) => sysmis
885 yrmoda($sysmis,$sysmis,$sysmis) => sysmis
886 yrmoda('a',1,2) => error
887 yrmoda(1,'a',2) => error
888 yrmoda(1,2,'a') => error
889 # FIXME: check out-of-range and nearly out-of-range values
891 ctime.days(date.mdy(6,10,1648)) + 577735 => 601716.00
892 ctime.days(date.mdy(6,30,1680)) + 577735 => 613424.00
893 ctime.days(date.mdy(7,24,1716)) + 577735 => 626596.00
894 ctime.days(date.mdy(6,19,1768)) + 577735 => 645554.00
895 ctime.days(date.mdy(8,2,1819)) + 577735 => 664224.00
896 ctime.days(date.mdy(3,27,1839)) + 577735 => 671401.00
897 ctime.days(date.mdy(4,19,1903)) + 577735 => 694799.00
898 ctime.days(date.mdy(8,25,1929)) + 577735 => 704424.00
899 ctime.days(date.mdy(9,29,1941)) + 577735 => 708842.00
900 ctime.days(date.mdy(4,19,1943)) + 577735 => 709409.00
901 ctime.days(date.mdy(10,7,1943)) + 577735 => 709580.00
902 ctime.days(date.mdy(3,17,1992)) + 577735 => 727274.00
903 ctime.days(date.mdy(2,25,1996)) + 577735 => 728714.00
904 ctime.days(date.mdy(11,10,2038)) + 577735 => 744313.00
905 ctime.days(date.mdy(7,18,2094)) + 577735 => 764652.00
906 # FIXME: check out-of-range and nearly out-of-range values
908 ctime.days(date.mdy(10,15,1582)) => 1.00
909 ctime.days(date.mdy(9,6,1719)) => 50000.00
910 ctime.days(date.mdy(1,24,1583)) => 102.00
911 ctime.days(date.mdy(12,14,1585)) => 1157.00
912 ctime.days(date.mdy(11,26,1621)) => 14288.00
913 ctime.days(date.mdy(12,25,1821)) => 87365.00
914 ctime.days(date.mdy(12,3,1882)) => 109623.00
915 ctime.days(date.mdy(4,6,2002)) => 153211.00
916 ctime.days(date.mdy(12,19,1999)) => 152372.00
917 ctime.days(date.mdy(10,1,1978)) => 144623.00
918 ctime.days(date.mdy(10,0,1978)) => 144622.00
919 ctime.days(date.mdy(10,32,1978)) => sysmis
920 ctime.days(date.mdy(0,31,1978)) => 144349.00
921 ctime.days(date.mdy(13,31,1978)) => 144745.00
922 ctime.days(date.mdy(10,$sysmis,1978)) => sysmis
923 ctime.days(date.mdy($sysmis,31,1978)) => sysmis
924 ctime.days(date.mdy(10,31,$sysmis)) => sysmis
925 ctime.days(date.mdy($sysmis,$sysmis,1978)) => sysmis
926 ctime.days(date.mdy($sysmis,31,$sysmis)) => sysmis
927 ctime.days(date.mdy(10,$sysmis,$sysmis)) => sysmis
928 ctime.days(date.mdy($sysmis,$sysmis,$sysmis)) => sysmis
929 date.mdy('a',1,2) => error
930 date.mdy(1,'a',2) => error
931 date.mdy(1,2,'a') => error
932 ctime.days(date.mdy(0,0,0)) => 152353.00
933 ctime.days(date.mdy(0,0,999)) => sysmis
934 date.mdy(1,1,1582) => sysmis
935 date.mdy(10,14,1582) => sysmis
936 date.mdy(10,15,1582) => 86400.00
938 ctime.days(date.moyr(1,2000)) => 152385.00
939 ctime.days(date.moyr(2,2000)) => 152416.00
940 ctime.days(date.moyr(3,2000)) => 152445.00
941 ctime.days(date.moyr(4,2000)) => 152476.00
942 ctime.days(date.moyr(5,2000)) => 152506.00
943 ctime.days(date.moyr(13,2000)) => 152751.00
944 ctime.days(date.moyr(14,2000)) => sysmis
945 ctime.days(date.moyr($sysmis,2000)) => sysmis
946 ctime.days(date.moyr(1,$sysmis)) => sysmis
947 ctime.days(date.moyr($sysmis,$sysmis)) => sysmis
948 date.moyr('a',2000) => error
949 date.moyr(5,'a') => error
950 date.moyr('a','b') => error
952 ctime.days(date.qyr(1,2000)) => 152385.00
953 ctime.days(date.qyr(2,2000)) => 152476.00
954 ctime.days(date.qyr(5,2000)) => 152751.00
955 ctime.days(date.qyr(6,2000)) => sysmis
956 ctime.days(date.qyr($sysmis,2000)) => sysmis
957 ctime.days(date.qyr(1,$sysmis)) => sysmis
958 ctime.days(date.qyr($sysmis,$sysmis)) => sysmis
959 date.qyr('a',2000) => error
960 date.qyr(5,'a') => error
961 date.qyr('a','b') => error
963 ctime.days(date.wkyr(1,2000)) => 152385.00
964 ctime.days(date.wkyr(15,1999)) => 152118.00
965 ctime.days(date.wkyr(36,1999)) => 152265.00
966 ctime.days(date.wkyr(54,1999)) => sysmis
967 ctime.days(date.wkyr($sysmis,1999)) => sysmis
968 ctime.days(date.wkyr(1,$sysmis)) => sysmis
969 ctime.days(date.wkyr($sysmis,$sysmis)) => sysmis
970 date.wkyr('a',1999) => error
971 date.wkyr(5,'a') => error
972 date.wkyr('a','b') => error
974 ctime.days(date.yrday(2000,1)) => 152385.00
975 ctime.days(date.yrday(2000,100)) => 152484.00
976 ctime.days(date.yrday(2000,253)) => 152637.00
977 ctime.days(date.yrday(2000,500)) => sysmis
978 ctime.days(date.yrday(2000,-100)) => sysmis
979 ctime.days(date.yrday(1999,$sysmis)) => sysmis
980 ctime.days(date.yrday($sysmis,1)) => sysmis
981 ctime.days(date.yrday($sysmis,$sysmis)) => sysmis
982 date.yrday(1999,'a') => error
983 date.yrday('a',5) => error
984 date.yrday('a','b') => error
986 xdate.date(date.mdy(6,10,1648) + time.hms(0,0,0)) / 86400 => 23981.00
987 xdate.date(date.mdy(6,30,1680) + time.hms(4,50,38)) / 86400 => 35689.00
988 xdate.date(date.mdy(7,24,1716) + time.hms(12,31,35)) / 86400 => 48861.00
989 xdate.date(date.mdy(6,19,1768) + time.hms(12,47,53)) / 86400 => 67819.00
990 xdate.date(date.mdy(8,2,1819) + time.hms(1,26,0)) / 86400 => 86489.00
991 xdate.date(date.mdy(3,27,1839) + time.hms(20,58,11)) / 86400 => 93666.00
992 xdate.date(date.mdy(4,19,1903) + time.hms(7,36,5)) / 86400 => 117064.00
993 xdate.date(date.mdy(8,25,1929) + time.hms(15,43,49)) / 86400 => 126689.00
994 xdate.date(date.mdy(9,29,1941) + time.hms(4,25,9)) / 86400 => 131107.00
995 xdate.date(date.mdy(4,19,1943) + time.hms(6,49,27)) / 86400 => 131674.00
996 xdate.date(date.mdy(10,7,1943) + time.hms(2,57,52)) / 86400 => 131845.00
997 xdate.date(date.mdy(3,17,1992) + time.hms(16,45,44)) / 86400 => 149539.00
998 xdate.date(date.mdy(2,25,1996) + time.hms(21,30,57)) / 86400 => 150979.00
999 xdate.date(date.mdy(9,29,41) + time.hms(4,25,9)) / 86400 => 131107.00
1000 xdate.date(date.mdy(4,19,43) + time.hms(6,49,27)) / 86400 => 131674.00
1001 xdate.date(date.mdy(10,7,43) + time.hms(2,57,52)) / 86400 => 131845.00
1002 xdate.date(date.mdy(3,17,92) + time.hms(16,45,44)) / 86400 => 149539.00
1003 xdate.date(date.mdy(2,25,96) + time.hms(21,30,57)) / 86400 => 150979.00
1004 xdate.date(date.mdy(11,10,2038) + time.hms(22,30,4)) / 86400 => 166578.00
1005 xdate.date(date.mdy(7,18,2094) + time.hms(1,56,51)) / 86400 => 186917.00
1006 xdate.date(123.4) => 0.00
1007 xdate.date('') => error
1009 xdate.hour(date.mdy(6,10,1648) + time.hms(0,0,0)) => 0.00
1010 xdate.hour(date.mdy(6,30,1680) + time.hms(4,50,38)) => 4.00
1011 xdate.hour(date.mdy(7,24,1716) + time.hms(12,31,35)) => 12.00
1012 xdate.hour(date.mdy(6,19,1768) + time.hms(12,47,53)) => 12.00
1013 xdate.hour(date.mdy(8,2,1819) + time.hms(1,26,0)) => 1.00
1014 xdate.hour(date.mdy(3,27,1839) + time.hms(20,58,11)) => 20.00
1015 xdate.hour(date.mdy(4,19,1903) + time.hms(7,36,5)) => 7.00
1016 xdate.hour(date.mdy(8,25,1929) + time.hms(15,43,49)) => 15.00
1017 xdate.hour(date.mdy(9,29,1941) + time.hms(4,25,9)) => 4.00
1018 xdate.hour(date.mdy(4,19,1943) + time.hms(6,49,27)) => 6.00
1019 xdate.hour(date.mdy(10,7,1943) + time.hms(2,57,52)) => 2.00
1020 xdate.hour(date.mdy(3,17,1992) + time.hms(16,45,44)) => 16.00
1021 xdate.hour(date.mdy(2,25,1996) + time.hms(21,30,57)) => 21.00
1022 xdate.hour(date.mdy(9,29,41) + time.hms(4,25,9)) => 4.00
1023 xdate.hour(date.mdy(4,19,43) + time.hms(6,49,27)) => 6.00
1024 xdate.hour(date.mdy(10,7,43) + time.hms(2,57,52)) => 2.00
1025 xdate.hour(date.mdy(3,17,92) + time.hms(16,45,44)) => 16.00
1026 xdate.hour(date.mdy(2,25,96) + time.hms(21,30,57)) => 21.00
1027 xdate.hour(date.mdy(11,10,2038) + time.hms(22,30,4)) => 22.00
1028 xdate.hour(date.mdy(7,18,2094) + time.hms(1,56,51)) => 1.00
1029 xdate.hour(-1) => -1.00
1030 xdate.hour(1) => 0.00
1031 xdate.hour($sysmis) => sysmis
1032 xdate.hour('') => error
1034 xdate.jday(date.mdy(6,10,1648) + time.hms(0,0,0)) => 162.00
1035 xdate.jday(date.mdy(6,30,1680) + time.hms(4,50,38)) => 182.00
1036 xdate.jday(date.mdy(7,24,1716) + time.hms(12,31,35)) => 206.00
1037 xdate.jday(date.mdy(6,19,1768) + time.hms(12,47,53)) => 171.00
1038 xdate.jday(date.mdy(8,2,1819) + time.hms(1,26,0)) => 214.00
1039 xdate.jday(date.mdy(3,27,1839) + time.hms(20,58,11)) => 86.00
1040 xdate.jday(date.mdy(4,19,1903) + time.hms(7,36,5)) => 109.00
1041 xdate.jday(date.mdy(8,25,1929) + time.hms(15,43,49)) => 237.00
1042 xdate.jday(date.mdy(9,29,1941) + time.hms(4,25,9)) => 272.00
1043 xdate.jday(date.mdy(4,19,1943) + time.hms(6,49,27)) => 109.00
1044 xdate.jday(date.mdy(10,7,1943) + time.hms(2,57,52)) => 280.00
1045 xdate.jday(date.mdy(3,17,1992) + time.hms(16,45,44)) => 77.00
1046 xdate.jday(date.mdy(2,25,1996) + time.hms(21,30,57)) => 56.00
1047 xdate.jday(date.mdy(9,29,41) + time.hms(4,25,9)) => 272.00
1048 xdate.jday(date.mdy(4,19,43) + time.hms(6,49,27)) => 109.00
1049 xdate.jday(date.mdy(10,7,43) + time.hms(2,57,52)) => 280.00
1050 xdate.jday(date.mdy(3,17,92) + time.hms(16,45,44)) => 77.00
1051 xdate.jday(date.mdy(2,25,96) + time.hms(21,30,57)) => 56.00
1052 xdate.jday(date.mdy(11,10,2038) + time.hms(22,30,4)) => 314.00
1053 xdate.jday(date.mdy(7,18,2094) + time.hms(1,56,51)) => 199.00
1054 xdate.jday(0) => sysmis
1055 xdate.jday(1) => sysmis
1056 xdate.jday(86400) => 288.00
1058 xdate.mday(date.mdy(6,10,1648) + time.hms(0,0,0)) => 10.00
1059 xdate.mday(date.mdy(6,30,1680) + time.hms(4,50,38)) => 30.00
1060 xdate.mday(date.mdy(7,24,1716) + time.hms(12,31,35)) => 24.00
1061 xdate.mday(date.mdy(6,19,1768) + time.hms(12,47,53)) => 19.00
1062 xdate.mday(date.mdy(8,2,1819) + time.hms(1,26,0)) => 2.00
1063 xdate.mday(date.mdy(3,27,1839) + time.hms(20,58,11)) => 27.00
1064 xdate.mday(date.mdy(4,19,1903) + time.hms(7,36,5)) => 19.00
1065 xdate.mday(date.mdy(8,25,1929) + time.hms(15,43,49)) => 25.00
1066 xdate.mday(date.mdy(9,29,1941) + time.hms(4,25,9)) => 29.00
1067 xdate.mday(date.mdy(4,19,1943) + time.hms(6,49,27)) => 19.00
1068 xdate.mday(date.mdy(10,7,1943) + time.hms(2,57,52)) => 7.00
1069 xdate.mday(date.mdy(3,17,1992) + time.hms(16,45,44)) => 17.00
1070 xdate.mday(date.mdy(2,25,1996) + time.hms(21,30,57)) => 25.00
1071 xdate.mday(date.mdy(9,29,41) + time.hms(4,25,9)) => 29.00
1072 xdate.mday(date.mdy(4,19,43) + time.hms(6,49,27)) => 19.00
1073 xdate.mday(date.mdy(10,7,43) + time.hms(2,57,52)) => 7.00
1074 xdate.mday(date.mdy(3,17,92) + time.hms(16,45,44)) => 17.00
1075 xdate.mday(date.mdy(2,25,96) + time.hms(21,30,57)) => 25.00
1076 xdate.mday(date.mdy(11,10,2038) + time.hms(22,30,4)) => 10.00
1077 xdate.mday(date.mdy(7,18,2094) + time.hms(1,56,51)) => 18.00
1079 xdate.minute(date.mdy(6,10,1648) + time.hms(0,0,0)) => 0.00
1080 xdate.minute(date.mdy(6,30,1680) + time.hms(4,50,38)) => 50.00
1081 xdate.minute(date.mdy(7,24,1716) + time.hms(12,31,35)) => 31.00
1082 xdate.minute(date.mdy(6,19,1768) + time.hms(12,47,53)) => 47.00
1083 xdate.minute(date.mdy(8,2,1819) + time.hms(1,26,0)) => 26.00
1084 xdate.minute(date.mdy(3,27,1839) + time.hms(20,58,11)) => 58.00
1085 xdate.minute(date.mdy(4,19,1903) + time.hms(7,36,5)) => 36.00
1086 xdate.minute(date.mdy(8,25,1929) + time.hms(15,43,49)) => 43.00
1087 xdate.minute(date.mdy(9,29,1941) + time.hms(4,25,9)) => 25.00
1088 xdate.minute(date.mdy(4,19,1943) + time.hms(6,49,27)) => 49.00
1089 xdate.minute(date.mdy(10,7,1943) + time.hms(2,57,52)) => 57.00
1090 xdate.minute(date.mdy(3,17,1992) + time.hms(16,45,44)) => 45.00
1091 xdate.minute(date.mdy(2,25,1996) + time.hms(21,30,57)) => 30.00
1092 xdate.minute(date.mdy(9,29,41) + time.hms(4,25,9)) => 25.00
1093 xdate.minute(date.mdy(4,19,43) + time.hms(6,49,27)) => 49.00
1094 xdate.minute(date.mdy(10,7,43) + time.hms(2,57,52)) => 57.00
1095 xdate.minute(date.mdy(3,17,92) + time.hms(16,45,44)) => 45.00
1096 xdate.minute(date.mdy(2,25,96) + time.hms(21,30,57)) => 30.00
1097 xdate.minute(date.mdy(11,10,2038) + time.hms(22,30,4)) => 30.00
1098 xdate.minute(date.mdy(7,18,2094) + time.hms(1,56,51)) => 56.00
1100 xdate.month(date.mdy(6,10,1648) + time.hms(0,0,0)) => 6.00
1101 xdate.month(date.mdy(6,30,1680) + time.hms(4,50,38)) => 6.00
1102 xdate.month(date.mdy(7,24,1716) + time.hms(12,31,35)) => 7.00
1103 xdate.month(date.mdy(6,19,1768) + time.hms(12,47,53)) => 6.00
1104 xdate.month(date.mdy(8,2,1819) + time.hms(1,26,0)) => 8.00
1105 xdate.month(date.mdy(3,27,1839) + time.hms(20,58,11)) => 3.00
1106 xdate.month(date.mdy(4,19,1903) + time.hms(7,36,5)) => 4.00
1107 xdate.month(date.mdy(8,25,1929) + time.hms(15,43,49)) => 8.00
1108 xdate.month(date.mdy(9,29,1941) + time.hms(4,25,9)) => 9.00
1109 xdate.month(date.mdy(4,19,1943) + time.hms(6,49,27)) => 4.00
1110 xdate.month(date.mdy(10,7,1943) + time.hms(2,57,52)) => 10.00
1111 xdate.month(date.mdy(3,17,1992) + time.hms(16,45,44)) => 3.00
1112 xdate.month(date.mdy(2,25,1996) + time.hms(21,30,57)) => 2.00
1113 xdate.month(date.mdy(9,29,41) + time.hms(4,25,9)) => 9.00
1114 xdate.month(date.mdy(4,19,43) + time.hms(6,49,27)) => 4.00
1115 xdate.month(date.mdy(10,7,43) + time.hms(2,57,52)) => 10.00
1116 xdate.month(date.mdy(3,17,92) + time.hms(16,45,44)) => 3.00
1117 xdate.month(date.mdy(2,25,96) + time.hms(21,30,57)) => 2.00
1118 xdate.month(date.mdy(11,10,2038) + time.hms(22,30,4)) => 11.00
1119 xdate.month(date.mdy(7,18,2094) + time.hms(1,56,51)) => 7.00
1121 xdate.quarter(date.mdy(6,10,1648) + time.hms(0,0,0)) => 2.00
1122 xdate.quarter(date.mdy(6,30,1680) + time.hms(4,50,38)) => 2.00
1123 xdate.quarter(date.mdy(7,24,1716) + time.hms(12,31,35)) => 3.00
1124 xdate.quarter(date.mdy(6,19,1768) + time.hms(12,47,53)) => 2.00
1125 xdate.quarter(date.mdy(8,2,1819) + time.hms(1,26,0)) => 3.00
1126 xdate.quarter(date.mdy(3,27,1839) + time.hms(20,58,11)) => 1.00
1127 xdate.quarter(date.mdy(4,19,1903) + time.hms(7,36,5)) => 2.00
1128 xdate.quarter(date.mdy(8,25,1929) + time.hms(15,43,49)) => 3.00
1129 xdate.quarter(date.mdy(9,29,1941) + time.hms(4,25,9)) => 3.00
1130 xdate.quarter(date.mdy(4,19,1943) + time.hms(6,49,27)) => 2.00
1131 xdate.quarter(date.mdy(10,7,1943) + time.hms(2,57,52)) => 4.00
1132 xdate.quarter(date.mdy(3,17,1992) + time.hms(16,45,44)) => 1.00
1133 xdate.quarter(date.mdy(2,25,1996) + time.hms(21,30,57)) => 1.00
1134 xdate.quarter(date.mdy(9,29,41) + time.hms(4,25,9)) => 3.00
1135 xdate.quarter(date.mdy(4,19,43) + time.hms(6,49,27)) => 2.00
1136 xdate.quarter(date.mdy(10,7,43) + time.hms(2,57,52)) => 4.00
1137 xdate.quarter(date.mdy(3,17,92) + time.hms(16,45,44)) => 1.00
1138 xdate.quarter(date.mdy(2,25,96) + time.hms(21,30,57)) => 1.00
1139 xdate.quarter(date.mdy(11,10,2038) + time.hms(22,30,4)) => 4.00
1140 xdate.quarter(date.mdy(7,18,2094) + time.hms(1,56,51)) => 3.00
1142 xdate.second(date.mdy(6,10,1648) + time.hms(0,0,0)) => 0.00
1143 xdate.second(date.mdy(6,30,1680) + time.hms(4,50,38)) => 38.00
1144 xdate.second(date.mdy(7,24,1716) + time.hms(12,31,35)) => 35.00
1145 xdate.second(date.mdy(6,19,1768) + time.hms(12,47,53)) => 53.00
1146 xdate.second(date.mdy(8,2,1819) + time.hms(1,26,0)) => 0.00
1147 xdate.second(date.mdy(3,27,1839) + time.hms(20,58,11)) => 11.00
1148 xdate.second(date.mdy(4,19,1903) + time.hms(7,36,5)) => 5.00
1149 xdate.second(date.mdy(8,25,1929) + time.hms(15,43,49)) => 49.00
1150 xdate.second(date.mdy(9,29,1941) + time.hms(4,25,9)) => 9.00
1151 xdate.second(date.mdy(4,19,1943) + time.hms(6,49,27)) => 27.00
1152 xdate.second(date.mdy(10,7,1943) + time.hms(2,57,52)) => 52.00
1153 xdate.second(date.mdy(3,17,1992) + time.hms(16,45,44)) => 44.00
1154 xdate.second(date.mdy(2,25,1996) + time.hms(21,30,57)) => 57.00
1155 xdate.second(date.mdy(9,29,41) + time.hms(4,25,9)) => 9.00
1156 xdate.second(date.mdy(4,19,43) + time.hms(6,49,27)) => 27.00
1157 xdate.second(date.mdy(10,7,43) + time.hms(2,57,52)) => 52.00
1158 xdate.second(date.mdy(3,17,92) + time.hms(16,45,44)) => 44.00
1159 xdate.second(date.mdy(2,25,96) + time.hms(21,30,57)) => 57.00
1160 xdate.second(date.mdy(11,10,2038) + time.hms(22,30,4)) => 4.00
1161 xdate.second(date.mdy(7,18,2094) + time.hms(1,56,51)) => 51.00
1163 xdate.tday(date.mdy(6,10,1648) + time.hms(0,0,0)) => 23981.00
1164 xdate.tday(date.mdy(6,30,1680) + time.hms(4,50,38)) => 35689.00
1165 xdate.tday(date.mdy(7,24,1716) + time.hms(12,31,35)) => 48861.00
1166 xdate.tday(date.mdy(6,19,1768) + time.hms(12,47,53)) => 67819.00
1167 xdate.tday(date.mdy(8,2,1819) + time.hms(1,26,0)) => 86489.00
1168 xdate.tday(date.mdy(3,27,1839) + time.hms(20,58,11)) => 93666.00
1169 xdate.tday(date.mdy(4,19,1903) + time.hms(7,36,5)) => 117064.00
1170 xdate.tday(date.mdy(8,25,1929) + time.hms(15,43,49)) => 126689.00
1171 xdate.tday(date.mdy(9,29,1941) + time.hms(4,25,9)) => 131107.00
1172 xdate.tday(date.mdy(4,19,1943) + time.hms(6,49,27)) => 131674.00
1173 xdate.tday(date.mdy(10,7,1943) + time.hms(2,57,52)) => 131845.00
1174 xdate.tday(date.mdy(3,17,1992) + time.hms(16,45,44)) => 149539.00
1175 xdate.tday(date.mdy(2,25,1996) + time.hms(21,30,57)) => 150979.00
1176 xdate.tday(date.mdy(9,29,41) + time.hms(4,25,9)) => 131107.00
1177 xdate.tday(date.mdy(4,19,43) + time.hms(6,49,27)) => 131674.00
1178 xdate.tday(date.mdy(10,7,43) + time.hms(2,57,52)) => 131845.00
1179 xdate.tday(date.mdy(3,17,92) + time.hms(16,45,44)) => 149539.00
1180 xdate.tday(date.mdy(2,25,96) + time.hms(21,30,57)) => 150979.00
1181 xdate.tday(date.mdy(11,10,2038) + time.hms(22,30,4)) => 166578.00
1182 xdate.tday(date.mdy(7,18,2094) + time.hms(1,56,51)) => 186917.00
1184 xdate.time(date.mdy(6,10,1648) + time.hms(0,0,0)) => 0.00
1185 xdate.time(date.mdy(6,30,1680) + time.hms(4,50,38)) => 17438.00
1186 xdate.time(date.mdy(7,24,1716) + time.hms(12,31,35)) => 45095.00
1187 xdate.time(date.mdy(6,19,1768) + time.hms(12,47,53)) => 46073.00
1188 xdate.time(date.mdy(8,2,1819) + time.hms(1,26,0)) => 5160.00
1189 xdate.time(date.mdy(3,27,1839) + time.hms(20,58,11)) => 75491.00
1190 xdate.time(date.mdy(4,19,1903) + time.hms(7,36,5)) => 27365.00
1191 xdate.time(date.mdy(8,25,1929) + time.hms(15,43,49)) => 56629.00
1192 xdate.time(date.mdy(9,29,1941) + time.hms(4,25,9)) => 15909.00
1193 xdate.time(date.mdy(4,19,1943) + time.hms(6,49,27)) => 24567.00
1194 xdate.time(date.mdy(10,7,1943) + time.hms(2,57,52)) => 10672.00
1195 xdate.time(date.mdy(3,17,1992) + time.hms(16,45,44)) => 60344.00
1196 xdate.time(date.mdy(2,25,1996) + time.hms(21,30,57)) => 77457.00
1197 xdate.time(date.mdy(9,29,41) + time.hms(4,25,9)) => 15909.00
1198 xdate.time(date.mdy(4,19,43) + time.hms(6,49,27)) => 24567.00
1199 xdate.time(date.mdy(10,7,43) + time.hms(2,57,52)) => 10672.00
1200 xdate.time(date.mdy(3,17,92) + time.hms(16,45,44)) => 60344.00
1201 xdate.time(date.mdy(2,25,96) + time.hms(21,30,57)) => 77457.00
1202 xdate.time(date.mdy(11,10,2038) + time.hms(22,30,4)) => 81004.00
1203 xdate.time(date.mdy(7,18,2094) + time.hms(1,56,51)) => 7011.00
1205 xdate.week(date.mdy(6,10,1648) + time.hms(0,0,0)) => 24.00
1206 xdate.week(date.mdy(6,30,1680) + time.hms(4,50,38)) => 26.00
1207 xdate.week(date.mdy(7,24,1716) + time.hms(12,31,35)) => 30.00
1208 xdate.week(date.mdy(6,19,1768) + time.hms(12,47,53)) => 25.00
1209 xdate.week(date.mdy(8,2,1819) + time.hms(1,26,0)) => 31.00
1210 xdate.week(date.mdy(3,27,1839) + time.hms(20,58,11)) => 13.00
1211 xdate.week(date.mdy(4,19,1903) + time.hms(7,36,5)) => 16.00
1212 xdate.week(date.mdy(8,25,1929) + time.hms(15,43,49)) => 34.00
1213 xdate.week(date.mdy(9,29,1941) + time.hms(4,25,9)) => 39.00
1214 xdate.week(date.mdy(4,19,1943) + time.hms(6,49,27)) => 16.00
1215 xdate.week(date.mdy(10,7,1943) + time.hms(2,57,52)) => 40.00
1216 xdate.week(date.mdy(3,17,1992) + time.hms(16,45,44)) => 11.00
1217 xdate.week(date.mdy(2,25,1996) + time.hms(21,30,57)) => 8.00
1218 xdate.week(date.mdy(9,29,41) + time.hms(4,25,9)) => 39.00
1219 xdate.week(date.mdy(4,19,43) + time.hms(6,49,27)) => 16.00
1220 xdate.week(date.mdy(10,7,43) + time.hms(2,57,52)) => 40.00
1221 xdate.week(date.mdy(3,17,92) + time.hms(16,45,44)) => 11.00
1222 xdate.week(date.mdy(2,25,96) + time.hms(21,30,57)) => 8.00
1223 xdate.week(date.mdy(11,10,2038) + time.hms(22,30,4)) => 45.00
1224 xdate.week(date.mdy(7,18,2094) + time.hms(1,56,51)) => 29.00
1226 xdate.wkday(date.mdy(6,10,1648)) => 4.00
1227 xdate.wkday(date.mdy(6,30,1680)) => 1.00
1228 xdate.wkday(date.mdy(7,24,1716)) => 6.00
1229 xdate.wkday(date.mdy(6,19,1768)) => 1.00
1230 xdate.wkday(date.mdy(8,2,1819)) => 2.00
1231 xdate.wkday(date.mdy(3,27,1839)) => 4.00
1232 xdate.wkday(date.mdy(4,19,1903)) => 1.00
1233 xdate.wkday(date.mdy(8,25,1929)) => 1.00
1234 xdate.wkday(date.mdy(9,29,1941)) => 2.00
1235 xdate.wkday(date.mdy(4,19,1943)) => 2.00
1236 xdate.wkday(date.mdy(10,7,1943)) => 5.00
1237 xdate.wkday(date.mdy(3,17,1992)) => 3.00
1238 xdate.wkday(date.mdy(2,25,1996)) => 1.00
1239 xdate.wkday(date.mdy(9,29,41)) => 2.00
1240 xdate.wkday(date.mdy(4,19,43)) => 2.00
1241 xdate.wkday(date.mdy(10,7,43)) => 5.00
1242 xdate.wkday(date.mdy(3,17,92)) => 3.00
1243 xdate.wkday(date.mdy(2,25,96)) => 1.00
1244 xdate.wkday(date.mdy(11,10,2038)) => 4.00
1245 xdate.wkday(date.mdy(7,18,2094)) => 1.00
1247 xdate.year(date.mdy(6,10,1648) + time.hms(0,0,0)) => 1648.00
1248 xdate.year(date.mdy(6,30,1680) + time.hms(4,50,38)) => 1680.00
1249 xdate.year(date.mdy(7,24,1716) + time.hms(12,31,35)) => 1716.00
1250 xdate.year(date.mdy(6,19,1768) + time.hms(12,47,53)) => 1768.00
1251 xdate.year(date.mdy(8,2,1819) + time.hms(1,26,0)) => 1819.00
1252 xdate.year(date.mdy(3,27,1839) + time.hms(20,58,11)) => 1839.00
1253 xdate.year(date.mdy(4,19,1903) + time.hms(7,36,5)) => 1903.00
1254 xdate.year(date.mdy(8,25,1929) + time.hms(15,43,49)) => 1929.00
1255 xdate.year(date.mdy(9,29,1941) + time.hms(4,25,9)) => 1941.00
1256 xdate.year(date.mdy(4,19,1943) + time.hms(6,49,27)) => 1943.00
1257 xdate.year(date.mdy(10,7,1943) + time.hms(2,57,52)) => 1943.00
1258 xdate.year(date.mdy(3,17,1992) + time.hms(16,45,44)) => 1992.00
1259 xdate.year(date.mdy(2,25,1996) + time.hms(21,30,57)) => 1996.00
1260 xdate.year(date.mdy(9,29,41) + time.hms(4,25,9)) => 1941.00
1261 xdate.year(date.mdy(4,19,43) + time.hms(6,49,27)) => 1943.00
1262 xdate.year(date.mdy(10,7,43) + time.hms(2,57,52)) => 1943.00
1263 xdate.year(date.mdy(3,17,92) + time.hms(16,45,44)) => 1992.00
1264 xdate.year(date.mdy(2,25,96) + time.hms(21,30,57)) => 1996.00
1265 xdate.year(date.mdy(11,10,2038) + time.hms(22,30,4)) => 2038.00
1266 xdate.year(date.mdy(7,18,2094) + time.hms(1,56,51)) => 2094.00
1268 datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'years') => -32.00
1269 datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'years') => -36.00
1270 datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'years') => -51.00
1271 datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'years') => -51.00
1272 datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'years') => -19.00
1273 datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'years') => -64.00
1274 datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'years') => -26.00
1275 datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'years') => -12.00
1276 datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'years') => -1.00
1277 datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'years') => 0.00
1278 datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'years') => -48.00
1279 datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'years') => -3.00
1280 datediff(date.mdy(9,29,41), date.mdy(2,25,1996), 'years') => -54.00
1281 datediff(date.mdy(9,29,41), date.mdy(4,19,43), 'years') => -1.00
1282 datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'years') => 0.00
1283 datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'years') => -48.00
1284 datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'years') => -3.00
1285 datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'years') => -42.00
1286 datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'years') => -55.00
1287 datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'years') => -3.00
1288 datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'years') => -4.00
1289 datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'years') => -2.00
1291 datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'quarters') => -128.00
1292 datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'quarters') => -144.00
1293 datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'quarters') => -207.00
1294 datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'quarters') => -204.00
1295 datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'quarters') => -78.00
1296 datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'quarters') => -256.00
1297 datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'quarters') => -105.00
1298 datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'quarters') => -48.00
1299 datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'quarters') => -6.00
1300 datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'quarters') => -1.00
1301 datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'quarters') => -193.00
1302 datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'quarters') => -15.00
1303 datediff(date.mdy(9,29,41), date.mdy(2,25,1996), 'quarters') => -217.00
1304 datediff(date.mdy(9,29,41), date.mdy(4,19,43), 'quarters') => -6.00
1305 datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'quarters') => -1.00
1306 datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'quarters') => -193.00
1307 datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'quarters') => -15.00
1308 datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'quarters') => -170.00
1309 datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'quarters') => -222.00
1310 datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'quarters') => -15.00
1311 datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'quarters') => -16.00
1312 datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'quarters') => -11.00
1314 datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'months') => -384.00
1315 datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'months') => -432.00
1316 datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'months') => -622.00
1317 datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'months') => -613.00
1318 datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'months') => -235.00
1319 datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'months') => -768.00
1320 datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'months') => -316.00
1321 datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'months') => -145.00
1322 datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'months') => -18.00
1323 datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'months') => -5.00
1324 datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'months') => -581.00
1325 datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'months') => -47.00
1326 datediff(date.mdy(9,29,41), date.mdy(2,25,1996), 'months') => -652.00
1327 datediff(date.mdy(9,29,41), date.mdy(4,19,43), 'months') => -18.00
1328 datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'months') => -5.00
1329 datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'months') => -581.00
1330 datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'months') => -47.00
1331 datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'months') => -512.00
1332 datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'months') => -668.00
1333 datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'months') => -47.00
1334 datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'months') => -48.00
1335 datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'months') => -35.00
1337 datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'weeks') => -1672.00
1338 datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'weeks') => -1881.00
1339 datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'weeks') => -2708.00
1340 datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'weeks') => -2667.00
1341 datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'weeks') => -1025.00
1342 datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'weeks') => -3342.00
1343 datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'weeks') => -1375.00
1344 datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'weeks') => -631.00
1345 datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'weeks') => -81.00
1346 datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'weeks') => -24.00
1347 datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'weeks') => -2527.00
1348 datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'weeks') => -205.00
1349 datediff(date.mdy(9,29,41), date.mdy(2,25,1996), 'weeks') => -2838.00
1350 datediff(date.mdy(9,29,41), date.mdy(4,19,43), 'weeks') => -81.00
1351 datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'weeks') => -24.00
1352 datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'weeks') => -2527.00
1353 datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'weeks') => -205.00
1354 datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'weeks') => -2228.00
1355 datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'weeks') => -2905.00
1356 datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'weeks') => -208.00
1357 datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'weeks') => -208.00
1358 datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'weeks') => -156.00
1360 datediff(date.mdy(6,10,1648), date.mdy(6,30,1680), 'days') => -11708.00
1361 datediff(date.mdy(6,30,1680), date.mdy(7,24,1716), 'days') => -13172.00
1362 datediff(date.mdy(7,24,1716), date.mdy(6,19,1768), 'days') => -18958.00
1363 datediff(date.mdy(6,19,1768), date.mdy(8,2,1819), 'days') => -18670.00
1364 datediff(date.mdy(8,2,1819), date.mdy(3,27,1839), 'days') => -7177.00
1365 datediff(date.mdy(3,27,1839), date.mdy(4,19,1903), 'days') => -23398.00
1366 datediff(date.mdy(4,19,1903), date.mdy(8,25,1929), 'days') => -9625.00
1367 datediff(date.mdy(8,25,1929), date.mdy(9,29,1941), 'days') => -4418.00
1368 datediff(date.mdy(9,29,1941), date.mdy(4,19,1943), 'days') => -567.00
1369 datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'days') => -171.00
1370 datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'days') => -17694.00
1371 datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'days') => -1440.00
1372 datediff(date.mdy(9,29,41), date.mdy(2,25,1996), 'days') => -19872.00
1373 datediff(date.mdy(9,29,41), date.mdy(4,19,43), 'days') => -567.00
1374 datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'days') => -171.00
1375 datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'days') => -17694.00
1376 datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'days') => -1440.00
1377 datediff(date.mdy(2,25,96), date.mdy(11,10,2038), 'days') => -15599.00
1378 datediff(date.mdy(11,10,2038), date.mdy(7,18,2094), 'days') => -20339.00
1379 datediff(date.mdy(2,29,1900), date.mdy(2,29,1904), 'days') => -1460.00
1380 datediff(date.mdy(2,29,1904), date.mdy(2,29,1908), 'days') => -1461.00
1381 datediff(date.mdy(2,29,1900), date.mdy(2,28,1903), 'days') => -1094.00
1383 datediff(date.mdy(6,30,1680), date.mdy(6,10,1648), 'years') => 32.00
1384 datediff(date.mdy(7,24,1716), date.mdy(6,30,1680), 'years') => 36.00
1385 datediff(date.mdy(6,19,1768), date.mdy(7,24,1716), 'years') => 51.00
1386 datediff(date.mdy(8,2,1819), date.mdy(6,19,1768), 'years') => 51.00
1387 datediff(date.mdy(3,27,1839), date.mdy(8,2,1819), 'years') => 19.00
1388 datediff(date.mdy(4,19,1903), date.mdy(3,27,1839), 'years') => 64.00
1389 datediff(date.mdy(8,25,1929), date.mdy(4,19,1903), 'years') => 26.00
1390 datediff(date.mdy(9,29,1941), date.mdy(8,25,1929), 'years') => 12.00
1391 datediff(date.mdy(4,19,1943), date.mdy(9,29,1941), 'years') => 1.00
1392 datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'years') => 0.00
1393 datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'years') => 48.00
1394 datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'years') => 3.00
1395 datediff(date.mdy(2,25,1996), date.mdy(9,29,41), 'years') => 54.00
1396 datediff(date.mdy(4,19,43), date.mdy(9,29,41), 'years') => 1.00
1397 datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'years') => 0.00
1398 datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'years') => 48.00
1399 datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'years') => 3.00
1400 datediff(date.mdy(11,10,2038), date.mdy(2,25,96), 'years') => 42.00
1401 datediff(date.mdy(7,18,2094), date.mdy(11,10,2038), 'years') => 55.00
1402 datediff(date.mdy(2,29,1904), date.mdy(2,29,1900), 'years') => 3.00
1403 datediff(date.mdy(2,29,1908), date.mdy(2,29,1904), 'years') => 4.00
1404 datediff(date.mdy(2,28,1903), date.mdy(2,29,1900), 'years') => 2.00
1406 datediff(date.mdy(6,30,1680), date.mdy(6,10,1648), 'months') => 384.00
1407 datediff(date.mdy(7,24,1716), date.mdy(6,30,1680), 'months') => 432.00
1408 datediff(date.mdy(6,19,1768), date.mdy(7,24,1716), 'months') => 622.00
1409 datediff(date.mdy(8,2,1819), date.mdy(6,19,1768), 'months') => 613.00
1410 datediff(date.mdy(3,27,1839), date.mdy(8,2,1819), 'months') => 235.00
1411 datediff(date.mdy(4,19,1903), date.mdy(3,27,1839), 'months') => 768.00
1412 datediff(date.mdy(8,25,1929), date.mdy(4,19,1903), 'months') => 316.00
1413 datediff(date.mdy(9,29,1941), date.mdy(8,25,1929), 'months') => 145.00
1414 datediff(date.mdy(4,19,1943), date.mdy(9,29,1941), 'months') => 18.00
1415 datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'months') => 5.00
1416 datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'months') => 581.00
1417 datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'months') => 47.00
1418 datediff(date.mdy(2,25,1996), date.mdy(9,29,41), 'months') => 652.00
1419 datediff(date.mdy(4,19,43), date.mdy(9,29,41), 'months') => 18.00
1420 datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'months') => 5.00
1421 datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'months') => 581.00
1422 datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'months') => 47.00
1423 datediff(date.mdy(11,10,2038), date.mdy(2,25,96), 'months') => 512.00
1424 datediff(date.mdy(7,18,2094), date.mdy(11,10,2038), 'months') => 668.00
1425 datediff(date.mdy(2,29,1904), date.mdy(2,29,1900), 'months') => 47.00
1426 datediff(date.mdy(2,29,1908), date.mdy(2,29,1904), 'months') => 48.00
1427 datediff(date.mdy(2,28,1903), date.mdy(2,29,1900), 'months') => 35.00
1429 datediff(date.mdy(6,30,1680), date.mdy(6,10,1648), 'quarters') => 128.00
1430 datediff(date.mdy(7,24,1716), date.mdy(6,30,1680), 'quarters') => 144.00
1431 datediff(date.mdy(6,19,1768), date.mdy(7,24,1716), 'quarters') => 207.00
1432 datediff(date.mdy(8,2,1819), date.mdy(6,19,1768), 'quarters') => 204.00
1433 datediff(date.mdy(3,27,1839), date.mdy(8,2,1819), 'quarters') => 78.00
1434 datediff(date.mdy(4,19,1903), date.mdy(3,27,1839), 'quarters') => 256.00
1435 datediff(date.mdy(8,25,1929), date.mdy(4,19,1903), 'quarters') => 105.00
1436 datediff(date.mdy(9,29,1941), date.mdy(8,25,1929), 'quarters') => 48.00
1437 datediff(date.mdy(4,19,1943), date.mdy(9,29,1941), 'quarters') => 6.00
1438 datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'quarters') => 1.00
1439 datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'quarters') => 193.00
1440 datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'quarters') => 15.00
1441 datediff(date.mdy(2,25,1996), date.mdy(9,29,41), 'quarters') => 217.00
1442 datediff(date.mdy(4,19,43), date.mdy(9,29,41), 'quarters') => 6.00
1443 datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'quarters') => 1.00
1444 datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'quarters') => 193.00
1445 datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'quarters') => 15.00
1446 datediff(date.mdy(11,10,2038), date.mdy(2,25,96), 'quarters') => 170.00
1447 datediff(date.mdy(7,18,2094), date.mdy(11,10,2038), 'quarters') => 222.00
1448 datediff(date.mdy(2,29,1904), date.mdy(2,29,1900), 'quarters') => 15.00
1449 datediff(date.mdy(2,29,1908), date.mdy(2,29,1904), 'quarters') => 16.00
1450 datediff(date.mdy(2,28,1903), date.mdy(2,29,1900), 'quarters') => 11.00
1452 # DATESUM with non-leap year
1453 ctime.days(datesum(date.mdy(1,31,1900), 1, 'months') - date.mdy(1,1,1900)) => 58.00
1454 ctime.days(datesum(date.mdy(1,31,1900), 2, 'months') - date.mdy(1,1,1900)) => 89.00
1455 ctime.days(datesum(date.mdy(1,31,1900), 3, 'months') - date.mdy(1,1,1900)) => 119.00
1456 ctime.days(datesum(date.mdy(1,31,1900), 4, 'months') - date.mdy(1,1,1900)) => 150.00
1457 ctime.days(datesum(date.mdy(1,31,1900), 5.4, 'months') - date.mdy(1,1,1900)) => 180.00
1458 ctime.days(datesum(date.mdy(1,31,1900), 6, 'months') - date.mdy(1,1,1900)) => 211.00
1459 ctime.days(datesum(date.mdy(1,31,1900), 7, 'months') - date.mdy(1,1,1900)) => 242.00
1460 ctime.days(datesum(date.mdy(1,31,1900), 8, 'months') - date.mdy(1,1,1900)) => 272.00
1461 ctime.days(datesum(date.mdy(1,31,1900), 9, 'months') - date.mdy(1,1,1900)) => 303.00
1462 ctime.days(datesum(date.mdy(1,31,1900), 10, 'months') - date.mdy(1,1,1900)) => 333.00
1463 ctime.days(datesum(date.mdy(1,31,1900), 11, 'months') - date.mdy(1,1,1900)) => 364.00
1464 ctime.days(datesum(date.mdy(1,31,1900), 12, 'months') - date.mdy(1,1,1900)) => 395.00
1465 ctime.days(datesum(date.mdy(1,31,1900), 13.9, 'months') - date.mdy(1,1,1900)) => 423.00
1466 ctime.days(datesum(date.mdy(1,31,1900), 1, 'months', 'rollover') - date.mdy(1,1,1900)) => 61.00
1467 ctime.days(datesum(date.mdy(1,31,1900), 2, 'months', 'rollover') - date.mdy(1,1,1900)) => 89.00
1468 ctime.days(datesum(date.mdy(1,31,1900), 3.2, 'months', 'rollover') - date.mdy(1,1,1900)) => 120.00
1469 ctime.days(datesum(date.mdy(1,31,1900), 4, 'months', 'rollover') - date.mdy(1,1,1900)) => 150.00
1470 ctime.days(datesum(date.mdy(1,31,1900), 5, 'months', 'rollover') - date.mdy(1,1,1900)) => 181.00
1471 ctime.days(datesum(date.mdy(1,31,1900), 6, 'months', 'rollover') - date.mdy(1,1,1900)) => 211.00
1472 ctime.days(datesum(date.mdy(1,31,1900), 7, 'months', 'rollover') - date.mdy(1,1,1900)) => 242.00
1473 ctime.days(datesum(date.mdy(1,31,1900), 8, 'months', 'rollover') - date.mdy(1,1,1900)) => 273.00
1474 ctime.days(datesum(date.mdy(1,31,1900), 9, 'months', 'rollover') - date.mdy(1,1,1900)) => 303.00
1475 ctime.days(datesum(date.mdy(1,31,1900), 10, 'months', 'rollover') - date.mdy(1,1,1900)) => 334.00
1476 ctime.days(datesum(date.mdy(1,31,1900), 11, 'months', 'rollover') - date.mdy(1,1,1900)) => 364.00
1477 ctime.days(datesum(date.mdy(1,31,1900), 12, 'months', 'rollover') - date.mdy(1,1,1900)) => 395.00
1478 ctime.days(datesum(date.mdy(1,31,1900), 13, 'months', 'rollover') - date.mdy(1,1,1900)) => 426.00
1480 # DATESUM with leap year
1481 ctime.days(datesum(date.mdy(1,31,1904), 1, 'months') - date.mdy(1,1,1904)) => 59.00
1482 ctime.days(datesum(date.mdy(1,31,1904), 2.5, 'months') - date.mdy(1,1,1904)) => 90.00
1483 ctime.days(datesum(date.mdy(1,31,1904), 3, 'months') - date.mdy(1,1,1904)) => 120.00
1484 ctime.days(datesum(date.mdy(1,31,1904), 4.9, 'months') - date.mdy(1,1,1904)) => 151.00
1485 ctime.days(datesum(date.mdy(1,31,1904), 5.1, 'months') - date.mdy(1,1,1904)) => 181.00
1486 ctime.days(datesum(date.mdy(1,31,1904), 6, 'months') - date.mdy(1,1,1904)) => 212.00
1487 ctime.days(datesum(date.mdy(1,31,1904), 7, 'months') - date.mdy(1,1,1904)) => 243.00
1488 ctime.days(datesum(date.mdy(1,31,1904), 8, 'months') - date.mdy(1,1,1904)) => 273.00
1489 ctime.days(datesum(date.mdy(1,31,1904), 9, 'months') - date.mdy(1,1,1904)) => 304.00
1490 ctime.days(datesum(date.mdy(1,31,1904), 10, 'months') - date.mdy(1,1,1904)) => 334.00
1491 ctime.days(datesum(date.mdy(1,31,1904), 11, 'months') - date.mdy(1,1,1904)) => 365.00
1492 ctime.days(datesum(date.mdy(1,31,1904), 12, 'months') - date.mdy(1,1,1904)) => 396.00
1493 ctime.days(datesum(date.mdy(1,31,1904), 13, 'months') - date.mdy(1,1,1904)) => 424.00
1494 ctime.days(datesum(date.mdy(1,31,1904), 1, 'months', 'rollover') - date.mdy(1,1,1904)) => 61.00
1495 ctime.days(datesum(date.mdy(1,31,1904), 2, 'months', 'rollover') - date.mdy(1,1,1904)) => 90.00
1496 ctime.days(datesum(date.mdy(1,31,1904), 3, 'months', 'rollover') - date.mdy(1,1,1904)) => 121.00
1497 ctime.days(datesum(date.mdy(1,31,1904), 4, 'months', 'rollover') - date.mdy(1,1,1904)) => 151.00
1498 ctime.days(datesum(date.mdy(1,31,1904), 5, 'months', 'rollover') - date.mdy(1,1,1904)) => 182.00
1499 ctime.days(datesum(date.mdy(1,31,1904), 6, 'months', 'rollover') - date.mdy(1,1,1904)) => 212.00
1500 ctime.days(datesum(date.mdy(1,31,1904), 7, 'months', 'rollover') - date.mdy(1,1,1904)) => 243.00
1501 ctime.days(datesum(date.mdy(1,31,1904), 8, 'months', 'rollover') - date.mdy(1,1,1904)) => 274.00
1502 ctime.days(datesum(date.mdy(1,31,1904), 9, 'months', 'rollover') - date.mdy(1,1,1904)) => 304.00
1503 ctime.days(datesum(date.mdy(1,31,1904), 10, 'months', 'rollover') - date.mdy(1,1,1904)) => 335.00
1504 ctime.days(datesum(date.mdy(1,31,1904), 11, 'months', 'rollover') - date.mdy(1,1,1904)) => 365.00
1505 ctime.days(datesum(date.mdy(1,31,1904), 12, 'months', 'rollover') - date.mdy(1,1,1904)) => 396.00
1506 ctime.days(datesum(date.mdy(1,31,1904), 13, 'months', 'rollover') - date.mdy(1,1,1904)) => 427.00
1508 ctime.days(datesum(date.mdy(6,10,1648), 1, 'weeks') - date.mdy(6,10,1648)) => 7.00
1509 ctime.days(datesum(date.mdy(6,30,1680), 2.5, 'weeks') - date.mdy(6,30,1680)) => 17.50
1510 ctime.days(datesum(date.mdy(7,24,1716), -3, 'weeks') - date.mdy(7,24,1716)) => -21.00
1511 ctime.days(datesum(date.mdy(6,19,1768), 4, 'weeks') - date.mdy(6,19,1768)) => 28.00
1512 ctime.days(datesum(date.mdy(8,2,1819), 5, 'weeks') - date.mdy(8,2,1819)) => 35.00
1514 ctime.days(datesum(date.mdy(6,10,1648), 1, 'days') - date.mdy(6,10,1648)) => 1.00
1515 ctime.days(datesum(date.mdy(6,30,1680), 2.5, 'days') - date.mdy(6,30,1680)) => 2.50
1516 ctime.days(datesum(date.mdy(7,24,1716), -3, 'days') - date.mdy(7,24,1716)) => -3.00
1517 ctime.days(datesum(date.mdy(6,19,1768), 4, 'days') - date.mdy(6,19,1768)) => 4.00
1518 ctime.days(datesum(date.mdy(8,2,1819), 5, 'days') - date.mdy(8,2,1819)) => 5.00
1520 ctime.days(datesum(date.mdy(6,10,1648), 1, 'hours') - date.mdy(6,10,1648)) => 0.04
1521 ctime.days(datesum(date.mdy(6,30,1680), 2.5, 'hours') - date.mdy(6,30,1680)) => 0.10
1522 ctime.days(datesum(date.mdy(6,19,1768), -4, 'hours') - date.mdy(6,19,1768)) => -0.17
1523 ctime.days(datesum(date.mdy(8,2,1819), 5, 'hours') - date.mdy(8,2,1819)) => 0.21
1525 # These test values are from Applied Statistics, Algorithm AS 310.
1526 1000 * ncdf.beta(.868,10,20,150) => 937.66
1527 1000 * ncdf.beta(.9,10,10,120) => 730.68
1528 1000 * ncdf.beta(.88,15,5,80) => 160.43
1529 1000 * ncdf.beta(.85,20,10,110) => 186.75
1530 1000 * ncdf.beta(.66,20,30,65) => 655.94
1531 1000 * ncdf.beta(.72,20,50,130) => 979.69
1532 1000 * ncdf.beta(.72,30,20,80) => 116.24
1533 1000 * ncdf.beta(.8,30,40,130) => 993.04
1537 (X = 1.00); X => 1.00
1539 SYSMIS($SYSMIS) => true
1540 SYSMIS(1 + $SYSMIS) => true
1542 # FIXME: out-of-range and nearly out-of-range values on dates
1544 # Tests correctness of generic optimizations in optimize_tree().
1545 (X = 10.00); x + 0 => 10.00
1546 (X = -3.00); x - 0 => -3.00
1547 (X = 5.00); 0 + x => 5.00
1548 (X = 10.00); x * 1 => 10.00
1549 (X = -3.00); 1 * x => -3.00
1550 (X = 5.00); x / 1 => 5.00
1551 (X = 10.00); 0 * x => 0.00
1552 (X = -3.00); x * 0 => 0.00
1553 (X = 5.00); 0 / x => 0.00
1554 (X = 5.00); mod(0, x) => 0.00
1555 (X = 5.00); x ** 1 => 5.00
1556 (X = 5.00); x ** 2 => 25.00
1558 if [ $? -ne 0 ] ; then no_result ; fi
1560 activity="create optimizing input"
1561 echo 'set mxwarn 1000.
1562 set mxerr 1000.' > $TEMPDIR/expr-opt.stat
1563 sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-opt.stat \
1564 -e 's#^\(\(.*\); \)*\(.*\) => .*$#DEBUG EVALUATE\2/\3.#'
1565 if [ $? -ne 0 ] ; then no_result ; fi
1567 activity="run optimizing program"
1568 $SUPERVISOR $PSPP --testing-mode \
1569 $TEMPDIR/expr-opt.stat >$TEMPDIR/expr-opt.err 2> $TEMPDIR/expr-opt.out
1571 activity="compare optimizing output"
1572 perl -pi -e 's/^\s*$//g' $TEMPDIR/expr-list $TEMPDIR/expr-opt.out
1573 diff -b $TEMPDIR/expr-list $TEMPDIR/expr-opt.out
1574 if [ $? -ne 0 ] ; then fail ; fi
1576 activity="create non-optimizing input"
1577 echo 'set mxwarn 1000.
1578 set mxerr 1000.' > $TEMPDIR/expr-noopt.stat
1579 sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-noopt.stat \
1580 -e 's#^\(\(.*\); \)*\(.*\) => .*$#DEBUG EVALUATE NOOPTIMIZE\2/\3.#'
1581 if [ $? -ne 0 ] ; then no_result ; fi
1583 activity="run non-optimizing program"
1584 $SUPERVISOR $PSPP --testing-mode \
1585 $TEMPDIR/expr-noopt.stat >$TEMPDIR/expr-noopt.err 2> $TEMPDIR/expr-noopt.out
1587 activity="compare non-optimizing output"
1588 perl -pi -e 's/^\s*$//g' $TEMPDIR/expr-list $TEMPDIR/expr-noopt.out
1589 diff -b $TEMPDIR/expr-list $TEMPDIR/expr-noopt.out
1590 if [ $? -ne 0 ] ; then fail ; fi
1592 activity="create optimizing postfix input"
1593 echo 'set mxwarn 1000.
1594 set mxerr 1000.' > $TEMPDIR/expr-opt-pos.stat
1595 sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-opt-pos.stat \
1596 -e 's#^\(\(.*\); \)*\(.*\) => .*$#DEBUG EVALUATE POSTFIX\2/\3.#'
1597 if [ $? -ne 0 ] ; then no_result ; fi
1599 activity="run optimizing postfix program"
1600 $SUPERVISOR $PSPP --testing-mode \
1601 $TEMPDIR/expr-opt-pos.stat >$TEMPDIR/expr-opt-pos.err 2> $TEMPDIR/expr-opt-pos.out
1602 if [ $? -eq 0 ] ; then no_result ; fi
1604 activity="create non-optimizing postfix input"
1605 echo 'set mxwarn 1000.
1606 set mxerr 1000.' > $TEMPDIR/expr-noopt-pos.stat
1607 sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-noopt-pos.stat \
1608 -e 's#^\(\(.*\); \)*\(.*\) => .*$#DEBUG EVALUATE NOOPTIMIZE POSTFIX\2/\3.#'
1609 if [ $? -ne 0 ] ; then no_result ; fi
1611 activity="run non-optimizing postfix program"
1612 $SUPERVISOR $PSPP --testing-mode \
1613 $TEMPDIR/expr-noopt-pos.stat >$TEMPDIR/expr-noopt-pos.err 2> $TEMPDIR/expr-noopt-pos.out
1614 if [ $? -eq 0 ] ; then no_result ; fi