Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 80 lines (55 sloc) 2.548 kb
58135b30 »
2008-05-08 [t/spec] changed 'use v6-alpha;' to 'use v6;'
1 use v6;
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
2 use Test;
b093af3e »
2012-09-22 Add test for the log of a very large Int.
3 plan 29;
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
4
626a59c1 »
2008-01-27 [rakudo] add directives to S29-num/ and convert pod to pod6
5 =begin pod
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
6
7 Basic tests for the log() and log10() builtins
8
626a59c1 »
2008-01-27 [rakudo] add directives to S29-num/ and convert pod to pod6
9 =end pod
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
10
ebdf5554 »
2009-12-07 [t/spec] Tweak to deal with lack of pi and numeric constants, refudge…
11 my $log_5 = 940945/584642;
12 my $log_one_tenth = -254834/110673;
13 my $log10_5 = 49471/70777;
14 my $log10_one_tenth = -1;
15 my $pi = 312689/99532;
16
b8d99dd7 »
2010-03-15 [t/spec] fix more smartlinks
17 # L<S32::Numeric/Numeric/"=item log">
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
18
ebdf5554 »
2009-12-07 [t/spec] Tweak to deal with lack of pi and numeric constants, refudge…
19 is_approx(log(5), $log_5, 'got the log of 5');
20 is_approx(log(0.1), $log_one_tenth, 'got the log of 0.1');
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
21
490073c5 »
2009-07-08 [t/spec] tests for two-arg log() function
22 # with given base:
b6ba5045 »
2012-02-26 pugs fudges
23 #?pugs 3 skip 'No compatible multi variant found: "&log"'
490073c5 »
2009-07-08 [t/spec] tests for two-arg log() function
24 is_approx(log(8, 2), 3, 'log(8, 2) is 3');
6528adff »
2010-01-05 [t/spec] Refudged after log($base) patch.
25 is_approx(log(42, 23), 1.192051192, 'log(42, 23)');
490073c5 »
2009-07-08 [t/spec] tests for two-arg log() function
26
27 # with non-Num
2531aec2 »
2010-05-15 [t/spec] Unfudge test after tweaking it a bit to avoid a unnecessary …
28 is_approx(log("42", "23"), 1.192051192, 'log(42, 23) with strings');
490073c5 »
2009-07-08 [t/spec] tests for two-arg log() function
29
b8d99dd7 »
2010-03-15 [t/spec] fix more smartlinks
30 # L<S32::Numeric/Numeric/"=item log10">
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
31
ebdf5554 »
2009-12-07 [t/spec] Tweak to deal with lack of pi and numeric constants, refudge…
32 is_approx(log10(5), $log10_5, 'got the log10 of 5');
33 is_approx(log10(0.1), $log10_one_tenth, 'got the log10 of 0.1');
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
34
e30f079b »
2009-02-19 Found log(0) bug; added log NaN/Inf tests and log10 complex tests
35 is( log(0), -Inf, 'log(0) = -Inf');
36
37 is( log(Inf), Inf, 'log(Inf) = Inf');
38 is( log(-Inf), NaN, 'log(-Inf) = NaN');
39 is( log(NaN), NaN, 'log(NaN) = NaN');
40
da95286f »
2009-02-18 Add tests for log10 with Inf's and NaN's
41 is( log10(0), -Inf, 'log10(0) = -Inf');
42 is( log10(Inf), Inf, 'log10(Inf) = Inf');
43 is( log10(-Inf), NaN, 'log10(-Inf) = NaN');
44 is( log10(NaN), NaN, 'log10(NaN) = NaN');
45
576906b4 »
2009-01-31 [t] added named arg tests to trig and num functions
46
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
47 # please add tests for complex numbers
48 #
49 # The closest I could find to documentation is here: http://tinyurl.com/27pj7c
50 # I use 1i instead of i since I don't know if a bare i will be supported
576906b4 »
2009-01-31 [t] added named arg tests to trig and num functions
51
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
52 # log(exp(i pi)) = i pi log(exp(1)) = i pi
ebdf5554 »
2009-12-07 [t/spec] Tweak to deal with lack of pi and numeric constants, refudge…
53 is_approx(log(-1 + 0i,), 0 + 1i * $pi, "got the log of -1");
54 is_approx(log10(-1 + 0i), 0 + 1i * $pi / log(10), "got the log10 of -1");
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
55
56 # log(exp(1+i pi)) = 1 + i pi
ebdf5554 »
2009-12-07 [t/spec] Tweak to deal with lack of pi and numeric constants, refudge…
57 is_approx(log(-exp(1) + 0i), 1 + 1i * $pi, "got the log of -e");
58 is_approx(log10(-10 + 0i), 1 + 1i * $pi / log(10), "got the log10 of -10");
60488e00 »
2008-07-27 Fix test which was wrongly expecting the returned value to have an an…
59 is_approx(log10(10), 1.0, 'log10(10)=1');
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
60
ebdf5554 »
2009-12-07 [t/spec] Tweak to deal with lack of pi and numeric constants, refudge…
61 is_approx(log((1+1i) / sqrt(2)), 0 + 1i * $pi / 4, "got log of exp(i pi/4)");
62 is_approx(log(1i), 1i * $pi / 2, "got the log of i (complex unit)");
60488e00 »
2008-07-27 Fix test which was wrongly expecting the returned value to have an an…
63
ebdf5554 »
2009-12-07 [t/spec] Tweak to deal with lack of pi and numeric constants, refudge…
64 is_approx(log10(1i), 1i * $pi / (2*log(10)), 'got the log10 of i');
65 is_approx(log10((1+1i) / sqrt(2)), 0 + 1i * $pi / (4*log(10)), "got log10 of exp(i pi/4)");
e30f079b »
2009-02-19 Found log(0) bug; added log NaN/Inf tests and log10 complex tests
66
ebdf5554 »
2009-12-07 [t/spec] Tweak to deal with lack of pi and numeric constants, refudge…
67 is_approx(log(-1i), -0.5i * $pi , "got the log of -i (complex unit)");
68 is_approx(log10(-1i), -0.5i * $pi / log(10), "got the log10 of -i (complex unit)");
ad1b86bb »
2008-01-24 [t] Test suite refactoring.
69
70 # TODO: please add more testcases for log10 of complex numbers
32e8945e »
2009-04-22 Additional tests for log10() of a Complex
71
ebdf5554 »
2009-12-07 [t/spec] Tweak to deal with lack of pi and numeric constants, refudge…
72 is_approx( (-1i).log10(), -0.5i*$pi / log(10), " (i).log10 = - i * pi/(2 log(10))");
e5545b3b »
2009-04-22 [t/spec] fix rakudo fudging of log.t; simplify a test
73 isa_ok( log10(-1+0i), Complex, 'log10 of a complex returns a complex, not a list');
b093af3e »
2012-09-22 Add test for the log of a very large Int.
74
3ec12fbb »
2012-09-24 rakudofudge new tests
75 #?rakudo todo 'HugeInt.log'
31d14e76 »
2013-01-14 pugs fudge
76 #?pugs todo
b093af3e »
2012-09-22 Add test for the log of a very large Int.
77 is_approx (10 ** 1000).log10, 1000, "Can take the log of very large Ints";
78
e5545b3b »
2009-04-22 [t/spec] fix rakudo fudging of log.t; simplify a test
79 # vim: ft=perl6
Something went wrong with that request. Please try again.