alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Scala example source code file (Course-2002-10.check)

This example Scala source code file (Course-2002-10.check) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Scala tags/keywords

The Scala Course-2002-10.check source code

fib(0) = 0
fib(1) = 1
fib(2) = 1
fib(3) = 2
fib(4) = 3
fib(5) = 5
fib(6) = 8
fib(7) = 13
fib(8) = 21
fib(9) = 34
fib(10) = 55
fib(11) = 89
fib(12) = 144
fib(13) = 233
fib(14) = 377
fib(15) = 610
fib(16) = 987
fib(17) = 1597
fib(18) = 2584
fib(19) = 4181

pi(0) = 4.0               , 3.166666666666667 , 4.0               
pi(1) = 2.666666666666667 , 3.1333333333333337, 3.166666666666667 
pi(2) = 3.466666666666667 , 3.1452380952380956, 3.142105263157895 
pi(3) = 2.8952380952380956, 3.1396825396825396, 3.1415993573190044
pi(4) = 3.33968253968254  , 3.142712842712843 , 3.141592714033778 
pi(5) = 2.976046176046176 , 3.140881340881341 , 3.1415926539752923
pi(6) = 3.283738483738484 , 3.142071817071817 , 3.141592653591176 
pi(7) = 3.017071817071817 , 3.1412548236077646, 3.141592653589777 
pi(8) = 3.252365934718876 , 3.1418396189294024, 3.141592653589794 
pi(9) = 3.0418396189294024, 3.141406718496502 , 3.1415926535897936
pi    = 3.141592653589793 , 3.141592653589793 , 3.141592653589793 

ln(0) = 1.0               , 0.7               , 1.0               
ln(1) = 0.5               , 0.6904761904761905, 0.7               
ln(2) = 0.8333333333333333, 0.6944444444444444, 0.6932773109243697
ln(3) = 0.5833333333333333, 0.6924242424242424, 0.6931488693329254
ln(4) = 0.7833333333333333, 0.6935897435897436, 0.6931471960735491
ln(5) = 0.6166666666666667, 0.6928571428571428, 0.6931471806635636
ln(6) = 0.7595238095238095, 0.6933473389355742, 0.6931471805604038
ln(7) = 0.6345238095238095, 0.6930033416875522, 0.6931471805599444
ln(8) = 0.7456349206349207, 0.6932539682539682, 0.6931471805599426
ln(9) = 0.6456349206349206, 0.6930657506744463, 0.6931471805599453
ln    = 0.6931471805599453, 0.6931471805599453, 0.6931471805599453

prime numbers: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113

Other Scala examples (source code examples)

Here is a short list of links related to this Scala Course-2002-10.check source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.