SlideShare a Scribd company logo
Calculations in Java with open source APICalculations in Java with open source APICalculations in Java with open source APICalculations in Java with open source API
Author: Davor Sauer
www.jdice.org
Content
Calculations in Java- basics
Calculations in Java with JCalc
Comparison of complex calculation with plain Java and
Features
Questions
of complex calculation with plain Java and JCalc
Calculations in Java-
Example: Simple calculation: If you pay $2.00 for a beer that costs $1.10,
how much changes do you get?
System.out.println(2.00 - 1.10); Answers:
a)
b)
c)
d)
gDecimal payment = new BigDecimal(2.00); Answers:gDecimal payment = new BigDecimal(2.00);
gDecimal cost = new BigDecimal(1.10);
ystem.out.println(payment.subtract(cost));
Answers:
a)
b)
c)
d)
=> 0.89999999991118215802998747...
gDecimal payment = new BigDecimal("2.00");
gDecimal cost = new BigDecimal("1.10");
ystem.out.println(payment.subtract(cost));
Answers:
a)
b)
c)
d)
- basics
Simple calculation: If you pay $2.00 for a beer that costs $1.10,
Answers:
.9
.90
0.899999999999
None of the above
Answers:Answers:
.9
.90
0.899999999999
None of the above
=> 0.89999999991118215802998747...
Answers:
.9
0.90
0.899999999999
None of the above
ava + JCalc
...more sugar?
Calculations in Java-
Example: Simple calculation: If you pay $2.00 for a beer that costs $1.10,
how much changes do you get?
System.out.println(Calculator.builder().val(2.00).sub(1.10).
m p = new Num(2.00);
m c = new Num(1.10);m c = new Num(1.10);
tem.out.println(Calculator.builder().val(p).sub(c).calculate
m p = new Num("2.00");
m c = new Num("1.10");
tem.out.println(Calculator.builder().val(p).sub(c).setStripTrailingZeros
tem.out.println(Calculator.builder("2.00 - 1.10").setStripTrailingZeros
- basics
Simple calculation: If you pay $2.00 for a beer that costs $1.10,
().val(2.00).sub(1.10).calculate());
Answers:
a) 0.9
b) .90
c) 0.899999999999
d) None of the above
0.899999999999
d) None of the above
calculate()); Answers:
a) .9
b) .90
c) 0.899999999999
d) None of the above
setStripTrailingZeros(false).calculate());
setStripTrailingZeros(false).calculate());
Answers:
a) .9
b) 0.90
c) 0.89999999
d) None of th
0.9
0.89999999991118215802998747...
Complex example
Calculate fixed monthly payment for a fixed rate mortgage by Java
ecimal interestRate = new BigDecimal("6.5"); // fixed yearly interest rate in %
ecimal P = new BigDecimal(200000);
ecimal paymentYears = new BigDecimal(30);
onthly interest rate => 6.5 / 12 / 100 = 0.0054166667
ecimal r = interestRate.divide(new BigDecimal(12), 10, BigDecimal.ROUND_HALF_UP).divide(new
umerator
> 0.005416666 * 200000 = 1083.3333400000
ecimal numerator = r.multiply(P);
enominatorenominator
.add(new BigDecimal(1)); // => 1.0054166667
ecimal pow = new BigDecimal(30 * 12); // N = 30 * 12
> 1.005416666 ^ (-30 * 12) ===> 1 / 1.005416666 ^ (30 * 12)
ecimal one = BigDecimal.ONE;
ecimal r_pow = r.pow(pow.intValue()); // => 1.0054166667 ^ 360 = 6.99179805731691416804....
w = one.divide(r_pow, 10, BigDecimal.ROUND_HALF_UP); // => 1 / 6.991798.. = 0.1430247258
> 1 - 0.1430247258 = 0.8569752742
ecimal denominator = new BigDecimal(1);
minator = denominator.subtract(r_pow);
> 1083.3333400000 / 0.8569752742 = 1264.1360522464
ecimal c = numerator.divide(denominator, 10, BigDecimal.ROUND_HALF_UP);
.setScale(2, BigDecimal.ROUND_HALF_UP);
em.out.println("c = " + c);
Calculate fixed monthly payment for a fixed rate mortgage by Java
).divide(new BigDecimal(100), 10, BigDecimal.ROUND_HALF_UP);
// => 1.0054166667 ^ 360 = 6.99179805731691416804....
// => 1 / 6.991798.. = 0.1430247258
Line of code: 15
Complex example
Calculate fixed monthly payment for a fixed rate mortgage by Java
m interestRate = new Num(6.5); // fixed yearly interest rate in %
m P = new Num(200000);
m paymentYears = new Num(30);
monthly interest rate : r = 6.5 / 100 / 12
m r = Calculator.builder().openBracket().val(interestRate).div(100).closeBracket().div(12).calculate();
= 30 * 12 * -1
m N = Calculator.builder().val(paymentYears).mul(12).mul(-1).calculate();
= (r * P) / (1 / (1 + r)^N
ulator c = new Calculator()
= (r * P) / (1 / (1 + r)^N
ulator c = new Calculator()
.openBracket()
.val(r).mul(P)
.closeBracket() // numerator
.div() // ---------------
.openBracket() // denumerator
.val(1).sub().openBracket().val(1).add(r).closeBracket
.closeBracket();
m result = c.calculate().setScale(2);
em.out.println("c = " + result); Line
Calculate fixed monthly payment for a fixed rate mortgage by Java
().div(12).calculate();
closeBracket().pow(N)
Line of code: 8
Complex example
Calculate fixed monthly payment for a fixed rate mortgage by Java
m interestRate = new Num("A", 6.5);
m P = new Num("B", 200000);
m paymentYears = new Num("C", -30);
ulator c = Calculator.builder("((A / 100 / 12) * B) / (1 - ((1 + (A / 100 / 12)) ^ (C * 12)))",
m result = c.calculate();
em.out.println("c = " + result.setScale(2));
Line
Calculate fixed monthly payment for a fixed rate mortgage by Java
((1 + (A / 100 / 12)) ^ (C * 12)))", interestRate, P, paymentYears);
Line of code: 6
Feature: Show calculation
Num interestRate = new Num("A", 6.5);
Num P = new Num("B", 200000);
Num paymentYears = new Num("C", -30);
Calculator c = Calculator.builder("((A / 100 / 12) * B) / (1 - ((1 + (A / 100 / 12)) ^ (C * 12)))",
c.setScale(10);
Num result = c.calculate(true, false); // track calculation steps, track details
for(String step : c.getCalculationSteps())
System.out.println(step);
System.out.println("c = " + result.setScale(2));
Output:
6.5 / 100 = 0.065
0.065/ 12 = 0.0054166667
0.0054166667 * 200000
6.5 / 100 = 0.065
0.065/ 12 = 0.0054166667
1 + 0.0054166667
-30 * 12 = -360
1.0054166667 ^ -360
1 - 0.1430247258
1083.33334/ 0.8569752742
c = 1264.14
calculation steps
((1 + (A / 100 / 12)) ^ (C * 12)))", interestRate, P, paymentYears);
= 0.065
= 0.0054166667
* 200000 = 1083.33334
= 0.065
= 0.0054166667
+ 0.0054166667 = 1.0054166667
360 = 0.1430247258
= 0.8569752742
/ 0.8569752742 = 1264.1360522464
Feature: Modularity
Calculator calc = new Calculator();
calc.register(QuestionOperator.class); // register custom operator '?'
calc.register(SumFunction.class); // register custom function 'sum'
calc.expression("2 ? 2 + 5 - 1 + sum(1,2,3,4)");
@SingletonComponent@SingletonComponent
public class QuestionOperator implements Operator {
....
// module for ‘?’ operator
....
}
@SingletonComponent
public class SumFunction implements Function {
....
// module for function ‘sum’
....
}
// register custom operator '?'
register custom function 'sum'
implements Operator {
Feature: Default configuration
roundingMode=HALF_UP
scale=2
stripTrailingZeros=true
decimalSeparator.out='.'
decimalSeparator.in='.'
numconverter[0]=org.jdice.calc.test.NumTest$CustomObject > org.jdice.calc.test.NumTest$CustomObjectNumConverter
Configure default properties with 'jcalc.properties' file in class path
numconverter[0]=org.jdice.calc.test.NumTest$CustomObject > org.jdice.calc.test.NumTest$CustomObjectNumConverter
operator[0]=org.jdice.calc.test.CustomOperatorFunctionTest$QuestionOperator
function[0]=org.jdice.calc.test.CustomOperatorFunctionTest$SumFunction
configuration
org.jdice.calc.test.NumTest$CustomObjectNumConverter
' file in class path
org.jdice.calc.test.NumTest$CustomObjectNumConverter
org.jdice.calc.test.CustomOperatorFunctionTest$QuestionOperator
org.jdice.calc.test.CustomOperatorFunctionTest$SumFunction
ions, ideas, suggestions…
Project page: www.jdice.org

More Related Content

What's hot

Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Critical buckling load geometric nonlinearity analysis of springs with rigid ...Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Salar Delavar Qashqai
 
Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)asghar123456
 
Numerical Method Assignment
Numerical Method AssignmentNumerical Method Assignment
Numerical Method Assignment
ashikul akash
 
Recursion in C
Recursion in CRecursion in C
Recursion in C
Lakshmi Sarvani Videla
 
Pytorch and Machine Learning for the Math Impaired
Pytorch and Machine Learning for the Math ImpairedPytorch and Machine Learning for the Math Impaired
Pytorch and Machine Learning for the Math Impaired
Tyrel Denison
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2
Mouna Guru
 
Experement no 6
Experement no 6Experement no 6
Experement no 6
Smita Batti
 
Graphics programs
Graphics programsGraphics programs
Graphics programs
NAVYA RAO
 
Graphics practical lab manual
Graphics practical lab manualGraphics practical lab manual
Graphics practical lab manual
Vivek Kumar Sinha
 
SPL 6.1 | Advanced problems on Operators and Math.h function in C
SPL 6.1 | Advanced problems on Operators and Math.h function in CSPL 6.1 | Advanced problems on Operators and Math.h function in C
SPL 6.1 | Advanced problems on Operators and Math.h function in C
Mohammad Imam Hossain
 
Resolución del-examen-de-la-práctica-de-métodos-numéricos
Resolución del-examen-de-la-práctica-de-métodos-numéricosResolución del-examen-de-la-práctica-de-métodos-numéricos
Resolución del-examen-de-la-práctica-de-métodos-numéricos
Carlos Cosi Mamani
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
Uma mohan
 
The Ring programming language version 1.3 book - Part 47 of 88
The Ring programming language version 1.3 book - Part 47 of 88The Ring programming language version 1.3 book - Part 47 of 88
The Ring programming language version 1.3 book - Part 47 of 88
Mahmoud Samir Fayed
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics lab
Priya Goyal
 
Firefox content
Firefox contentFirefox content
Firefox contentUbald Agi
 
Mathematics Function in C ,ppt
Mathematics Function in C ,pptMathematics Function in C ,ppt
Mathematics Function in C ,ppt
AllNewTeach
 
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSLET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERS
KavyaSharma65
 
The Ring programming language version 1.9 book - Part 75 of 210
The Ring programming language version 1.9 book - Part 75 of 210The Ring programming language version 1.9 book - Part 75 of 210
The Ring programming language version 1.9 book - Part 75 of 210
Mahmoud Samir Fayed
 

What's hot (20)

Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Critical buckling load geometric nonlinearity analysis of springs with rigid ...Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Critical buckling load geometric nonlinearity analysis of springs with rigid ...
 
Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)Amth250 octave matlab some solutions (4)
Amth250 octave matlab some solutions (4)
 
Numerical Method Assignment
Numerical Method AssignmentNumerical Method Assignment
Numerical Method Assignment
 
Struct examples
Struct examplesStruct examples
Struct examples
 
Recursion in C
Recursion in CRecursion in C
Recursion in C
 
Pytorch and Machine Learning for the Math Impaired
Pytorch and Machine Learning for the Math ImpairedPytorch and Machine Learning for the Math Impaired
Pytorch and Machine Learning for the Math Impaired
 
Oops lab manual2
Oops lab manual2Oops lab manual2
Oops lab manual2
 
Experement no 6
Experement no 6Experement no 6
Experement no 6
 
Graphics programs
Graphics programsGraphics programs
Graphics programs
 
Graphics practical lab manual
Graphics practical lab manualGraphics practical lab manual
Graphics practical lab manual
 
SPL 6.1 | Advanced problems on Operators and Math.h function in C
SPL 6.1 | Advanced problems on Operators and Math.h function in CSPL 6.1 | Advanced problems on Operators and Math.h function in C
SPL 6.1 | Advanced problems on Operators and Math.h function in C
 
Resolución del-examen-de-la-práctica-de-métodos-numéricos
Resolución del-examen-de-la-práctica-de-métodos-numéricosResolución del-examen-de-la-práctica-de-métodos-numéricos
Resolución del-examen-de-la-práctica-de-métodos-numéricos
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Arrays
ArraysArrays
Arrays
 
The Ring programming language version 1.3 book - Part 47 of 88
The Ring programming language version 1.3 book - Part 47 of 88The Ring programming language version 1.3 book - Part 47 of 88
The Ring programming language version 1.3 book - Part 47 of 88
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics lab
 
Firefox content
Firefox contentFirefox content
Firefox content
 
Mathematics Function in C ,ppt
Mathematics Function in C ,pptMathematics Function in C ,ppt
Mathematics Function in C ,ppt
 
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSLET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERS
 
The Ring programming language version 1.9 book - Part 75 of 210
The Ring programming language version 1.9 book - Part 75 of 210The Ring programming language version 1.9 book - Part 75 of 210
The Ring programming language version 1.9 book - Part 75 of 210
 

Viewers also liked

JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško VukmanovićJavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan Kljajin
JavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan KljajinJavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan Kljajin
JavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan Kljajin
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...
JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...
JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Going Digital with Java EE - Peter Pilgrim
JavaCro'14 - Going Digital with Java EE - Peter PilgrimJavaCro'14 - Going Digital with Java EE - Peter Pilgrim
JavaCro'14 - Going Digital with Java EE - Peter Pilgrim
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Sustainability of business performance and best practices – Zlat...
JavaCro'14 - Sustainability of business performance and best practices – Zlat...JavaCro'14 - Sustainability of business performance and best practices – Zlat...
JavaCro'14 - Sustainability of business performance and best practices – Zlat...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Automatized testing with Selenium 2 – Juraj Ćutić and Aleksander...
JavaCro'14 - Automatized testing with Selenium 2 – Juraj Ćutić and Aleksander...JavaCro'14 - Automatized testing with Selenium 2 – Juraj Ćutić and Aleksander...
JavaCro'14 - Automatized testing with Selenium 2 – Juraj Ćutić and Aleksander...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...
JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...
JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Auditing of user activity through NoSQL database – Kristijan Duv...
JavaCro'14 - Auditing of user activity through NoSQL database – Kristijan Duv...JavaCro'14 - Auditing of user activity through NoSQL database – Kristijan Duv...
JavaCro'14 - Auditing of user activity through NoSQL database – Kristijan Duv...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Java in M2M technologies – Mango M2M software – Ivan Raguž
JavaCro'14 - Java in M2M technologies – Mango M2M software – Ivan RagužJavaCro'14 - Java in M2M technologies – Mango M2M software – Ivan Raguž
JavaCro'14 - Java in M2M technologies – Mango M2M software – Ivan Raguž
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...
JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...
JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Take Agile adoption to the next level with Integration Competenc...
JavaCro'14 - Take Agile adoption to the next level with Integration Competenc...JavaCro'14 - Take Agile adoption to the next level with Integration Competenc...
JavaCro'14 - Take Agile adoption to the next level with Integration Competenc...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - MEAN Stack – How & When – Nenad Pećanac
JavaCro'14 - MEAN Stack – How & When – Nenad PećanacJavaCro'14 - MEAN Stack – How & When – Nenad Pećanac
JavaCro'14 - MEAN Stack – How & When – Nenad Pećanac
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - ZeroMQ and Java(Script) – Mladen Čikara
JavaCro'14 - ZeroMQ and Java(Script) – Mladen ČikaraJavaCro'14 - ZeroMQ and Java(Script) – Mladen Čikara
JavaCro'14 - ZeroMQ and Java(Script) – Mladen Čikara
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan JanssenJavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir DžaferovićJavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - Is there a single “correct” web architecture for business apps –...
JavaCro'14 - Is there a single “correct” web architecture for business apps –...JavaCro'14 - Is there a single “correct” web architecture for business apps –...
JavaCro'14 - Is there a single “correct” web architecture for business apps –...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'14 - GWT rebooted – Gordan Krešić
JavaCro'14 - GWT rebooted – Gordan KrešićJavaCro'14 - GWT rebooted – Gordan Krešić

Viewers also liked (20)

JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško VukmanovićJavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
 
JavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan Kljajin
JavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan KljajinJavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan Kljajin
JavaCro'14 - WebSockets and OpenLayers joined with Spring – Bojan Kljajin
 
JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...
JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...
JavaCro'14 - The World of Java – in Croatia – Branko Mihaljević and Aleksande...
 
JavaCro'14 - Going Digital with Java EE - Peter Pilgrim
JavaCro'14 - Going Digital with Java EE - Peter PilgrimJavaCro'14 - Going Digital with Java EE - Peter Pilgrim
JavaCro'14 - Going Digital with Java EE - Peter Pilgrim
 
JavaCro'14 - Sustainability of business performance and best practices – Zlat...
JavaCro'14 - Sustainability of business performance and best practices – Zlat...JavaCro'14 - Sustainability of business performance and best practices – Zlat...
JavaCro'14 - Sustainability of business performance and best practices – Zlat...
 
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
 
JavaCro'14 - Automatized testing with Selenium 2 – Juraj Ćutić and Aleksander...
JavaCro'14 - Automatized testing with Selenium 2 – Juraj Ćutić and Aleksander...JavaCro'14 - Automatized testing with Selenium 2 – Juraj Ćutić and Aleksander...
JavaCro'14 - Automatized testing with Selenium 2 – Juraj Ćutić and Aleksander...
 
JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...
JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...
JavaCro'14 - Amphinicy crown jewels our software development infrastructure –...
 
JavaCro'14 - Auditing of user activity through NoSQL database – Kristijan Duv...
JavaCro'14 - Auditing of user activity through NoSQL database – Kristijan Duv...JavaCro'14 - Auditing of user activity through NoSQL database – Kristijan Duv...
JavaCro'14 - Auditing of user activity through NoSQL database – Kristijan Duv...
 
JavaCro'14 - Java in M2M technologies – Mango M2M software – Ivan Raguž
JavaCro'14 - Java in M2M technologies – Mango M2M software – Ivan RagužJavaCro'14 - Java in M2M technologies – Mango M2M software – Ivan Raguž
JavaCro'14 - Java in M2M technologies – Mango M2M software – Ivan Raguž
 
JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...
JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...
JavaCro'14 - Cloud Platforms in Internet of Things – Krešimir Mišura and Bran...
 
JavaCro'14 - Take Agile adoption to the next level with Integration Competenc...
JavaCro'14 - Take Agile adoption to the next level with Integration Competenc...JavaCro'14 - Take Agile adoption to the next level with Integration Competenc...
JavaCro'14 - Take Agile adoption to the next level with Integration Competenc...
 
JavaCro'14 - MEAN Stack – How & When – Nenad Pećanac
JavaCro'14 - MEAN Stack – How & When – Nenad PećanacJavaCro'14 - MEAN Stack – How & When – Nenad Pećanac
JavaCro'14 - MEAN Stack – How & When – Nenad Pećanac
 
JavaCro'14 - ZeroMQ and Java(Script) – Mladen Čikara
JavaCro'14 - ZeroMQ and Java(Script) – Mladen ČikaraJavaCro'14 - ZeroMQ and Java(Script) – Mladen Čikara
JavaCro'14 - ZeroMQ and Java(Script) – Mladen Čikara
 
JavaCro'14 - Packaging and installing of the JEE solution – Miroslav Rešetar
JavaCro'14 - Packaging and installing of the JEE solution – Miroslav RešetarJavaCro'14 - Packaging and installing of the JEE solution – Miroslav Rešetar
JavaCro'14 - Packaging and installing of the JEE solution – Miroslav Rešetar
 
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan JanssenJavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
JavaCro'14 - Profile any environment with Java Flight Recorder – Johan Janssen
 
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir DžaferovićJavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
JavaCro'14 - Continuous deployment tool – Aleksandar Dostić and Emir Džaferović
 
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
JavaCro'14 - Drools Decision tables – form of human-readable rules – Dragan J...
 
JavaCro'14 - Is there a single “correct” web architecture for business apps –...
JavaCro'14 - Is there a single “correct” web architecture for business apps –...JavaCro'14 - Is there a single “correct” web architecture for business apps –...
JavaCro'14 - Is there a single “correct” web architecture for business apps –...
 
JavaCro'14 - GWT rebooted – Gordan Krešić
JavaCro'14 - GWT rebooted – Gordan KrešićJavaCro'14 - GWT rebooted – Gordan Krešić
JavaCro'14 - GWT rebooted – Gordan Krešić
 

Similar to JavaCro'14 - JCalc Calculations in Java with open source API – Davor Sauer

662305 11
662305 11662305 11
Compose Async with RxJS
Compose Async with RxJSCompose Async with RxJS
Compose Async with RxJS
Kyung Yeol Kim
 
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Mario Fusco
 
C lab programs
C lab programsC lab programs
C lab programs
Dr. Prashant Vats
 
C lab programs
C lab programsC lab programs
C lab programs
Dr. Prashant Vats
 
PID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachPID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB Approach
Waleed El-Badry
 
Informatics Practice Practical for 12th class
Informatics Practice Practical for 12th classInformatics Practice Practical for 12th class
Informatics Practice Practical for 12th class
phultoosks876
 
6
66
Super TypeScript II Turbo - FP Remix (NG Conf 2017)
Super TypeScript II Turbo - FP Remix (NG Conf 2017)Super TypeScript II Turbo - FP Remix (NG Conf 2017)
Super TypeScript II Turbo - FP Remix (NG Conf 2017)
Sean May
 
Method overriding in java
Method overriding in javaMethod overriding in java
Method overriding in java
One97 Communications Limited
 
Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Palak Sanghani
 
Aplicaciones de la derivada en la Carrera de Contabilidad y Auditoría
Aplicaciones de la derivada en la Carrera de Contabilidad y AuditoríaAplicaciones de la derivada en la Carrera de Contabilidad y Auditoría
Aplicaciones de la derivada en la Carrera de Contabilidad y Auditoría
LeslieMoncayo1
 
A few solvers for portfolio selection
A few solvers for portfolio selectionA few solvers for portfolio selection
A few solvers for portfolio selection
Bogusz Jelinski
 
Hello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdfHello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdf
FashionColZone
 

Similar to JavaCro'14 - JCalc Calculations in Java with open source API – Davor Sauer (20)

662305 11
662305 11662305 11
662305 11
 
Compose Async with RxJS
Compose Async with RxJSCompose Async with RxJS
Compose Async with RxJS
 
Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...Laziness, trampolines, monoids and other functional amenities: this is not yo...
Laziness, trampolines, monoids and other functional amenities: this is not yo...
 
662305 LAB13
662305 LAB13662305 LAB13
662305 LAB13
 
C lab programs
C lab programsC lab programs
C lab programs
 
C lab programs
C lab programsC lab programs
C lab programs
 
Test2
Test2Test2
Test2
 
F
FF
F
 
F
FF
F
 
F
FF
F
 
F
FF
F
 
PID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB ApproachPID Tuning using Ziegler Nicholas - MATLAB Approach
PID Tuning using Ziegler Nicholas - MATLAB Approach
 
Informatics Practice Practical for 12th class
Informatics Practice Practical for 12th classInformatics Practice Practical for 12th class
Informatics Practice Practical for 12th class
 
6
66
6
 
Super TypeScript II Turbo - FP Remix (NG Conf 2017)
Super TypeScript II Turbo - FP Remix (NG Conf 2017)Super TypeScript II Turbo - FP Remix (NG Conf 2017)
Super TypeScript II Turbo - FP Remix (NG Conf 2017)
 
Method overriding in java
Method overriding in javaMethod overriding in java
Method overriding in java
 
Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]Lec 9 05_sept [compatibility mode]
Lec 9 05_sept [compatibility mode]
 
Aplicaciones de la derivada en la Carrera de Contabilidad y Auditoría
Aplicaciones de la derivada en la Carrera de Contabilidad y AuditoríaAplicaciones de la derivada en la Carrera de Contabilidad y Auditoría
Aplicaciones de la derivada en la Carrera de Contabilidad y Auditoría
 
A few solvers for portfolio selection
A few solvers for portfolio selectionA few solvers for portfolio selection
A few solvers for portfolio selection
 
Hello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdfHello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdf
 

More from HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association

Java cro'21 the best tools for java developers in 2021 - hujak
Java cro'21   the best tools for java developers in 2021 - hujakJava cro'21   the best tools for java developers in 2021 - hujak
Java cro'21 the best tools for java developers in 2021 - hujak
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'21 - Java is Here To Stay - HUJAK Keynote
JavaCro'21 - Java is Here To Stay - HUJAK KeynoteJavaCro'21 - Java is Here To Stay - HUJAK Keynote
JavaCro'21 - Java is Here To Stay - HUJAK Keynote
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan LozićJavantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander RadovanJavantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - When remote work really works - the secrets behind successful ...
Javantura v6 - When remote work really works - the secrets behind successful ...Javantura v6 - When remote work really works - the secrets behind successful ...
Javantura v6 - When remote work really works - the secrets behind successful ...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - Kotlin-Java Interop - Matej Vidaković
Javantura v6 - Kotlin-Java Interop - Matej VidakovićJavantura v6 - Kotlin-Java Interop - Matej Vidaković
Javantura v6 - Kotlin-Java Interop - Matej Vidaković
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - How can you improve the quality of your application - Ioannis ...
Javantura v6 - How can you improve the quality of your application - Ioannis ...Javantura v6 - How can you improve the quality of your application - Ioannis ...
Javantura v6 - How can you improve the quality of your application - Ioannis ...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - Just say it v2 - Pavao Varela Petrac
Javantura v6 - Just say it v2 - Pavao Varela PetracJavantura v6 - Just say it v2 - Pavao Varela Petrac
Javantura v6 - Just say it v2 - Pavao Varela Petrac
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - Automation of web apps testing - Hrvoje Ruhek
Javantura v6 - Automation of web apps testing - Hrvoje RuhekJavantura v6 - Automation of web apps testing - Hrvoje Ruhek
Javantura v6 - Automation of web apps testing - Hrvoje Ruhek
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Javantura v6 - Building IoT Middleware with Microservices - Mario Kusek
Javantura v6 - Building IoT Middleware with Microservices - Mario KusekJavantura v6 - Building IoT Middleware with Microservices - Mario Kusek
Javantura v6 - Building IoT Middleware with Microservices - Mario Kusek
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 

More from HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association (20)

Java cro'21 the best tools for java developers in 2021 - hujak
Java cro'21   the best tools for java developers in 2021 - hujakJava cro'21   the best tools for java developers in 2021 - hujak
Java cro'21 the best tools for java developers in 2021 - hujak
 
JavaCro'21 - Java is Here To Stay - HUJAK Keynote
JavaCro'21 - Java is Here To Stay - HUJAK KeynoteJavaCro'21 - Java is Here To Stay - HUJAK Keynote
JavaCro'21 - Java is Here To Stay - HUJAK Keynote
 
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan LozićJavantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
 
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
Javantura v7 - The State of Java - Today and Tomowwow - HUJAK's Community Key...
 
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader -...
 
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
JavaCro'19 - The State of Java and Software Development in Croatia - Communit...
 
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander RadovanJavantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
Javantura v6 - Java in Croatia and HUJAK - Branko Mihaljević, Aleksander Radovan
 
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
 
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
Javantura v6 - Case Study: Marketplace App with Java and Hyperledger Fabric -...
 
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
Javantura v6 - How to help customers report bugs accurately - Miroslav Čerkez...
 
Javantura v6 - When remote work really works - the secrets behind successful ...
Javantura v6 - When remote work really works - the secrets behind successful ...Javantura v6 - When remote work really works - the secrets behind successful ...
Javantura v6 - When remote work really works - the secrets behind successful ...
 
Javantura v6 - Kotlin-Java Interop - Matej Vidaković
Javantura v6 - Kotlin-Java Interop - Matej VidakovićJavantura v6 - Kotlin-Java Interop - Matej Vidaković
Javantura v6 - Kotlin-Java Interop - Matej Vidaković
 
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
Javantura v6 - Spring HATEOAS hypermedia-driven web services, and clients tha...
 
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
Javantura v6 - End to End Continuous Delivery of Microservices for Kubernetes...
 
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
Javantura v6 - Istio Service Mesh - The magic between your microservices - Ma...
 
Javantura v6 - How can you improve the quality of your application - Ioannis ...
Javantura v6 - How can you improve the quality of your application - Ioannis ...Javantura v6 - How can you improve the quality of your application - Ioannis ...
Javantura v6 - How can you improve the quality of your application - Ioannis ...
 
Javantura v6 - Just say it v2 - Pavao Varela Petrac
Javantura v6 - Just say it v2 - Pavao Varela PetracJavantura v6 - Just say it v2 - Pavao Varela Petrac
Javantura v6 - Just say it v2 - Pavao Varela Petrac
 
Javantura v6 - Automation of web apps testing - Hrvoje Ruhek
Javantura v6 - Automation of web apps testing - Hrvoje RuhekJavantura v6 - Automation of web apps testing - Hrvoje Ruhek
Javantura v6 - Automation of web apps testing - Hrvoje Ruhek
 
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
Javantura v6 - Master the Concepts Behind the Java 10 Challenges and Eliminat...
 
Javantura v6 - Building IoT Middleware with Microservices - Mario Kusek
Javantura v6 - Building IoT Middleware with Microservices - Mario KusekJavantura v6 - Building IoT Middleware with Microservices - Mario Kusek
Javantura v6 - Building IoT Middleware with Microservices - Mario Kusek
 

Recently uploaded

Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 

Recently uploaded (20)

Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 

JavaCro'14 - JCalc Calculations in Java with open source API – Davor Sauer

  • 1. Calculations in Java with open source APICalculations in Java with open source APICalculations in Java with open source APICalculations in Java with open source API Author: Davor Sauer www.jdice.org
  • 2. Content Calculations in Java- basics Calculations in Java with JCalc Comparison of complex calculation with plain Java and Features Questions of complex calculation with plain Java and JCalc
  • 3.
  • 4. Calculations in Java- Example: Simple calculation: If you pay $2.00 for a beer that costs $1.10, how much changes do you get? System.out.println(2.00 - 1.10); Answers: a) b) c) d) gDecimal payment = new BigDecimal(2.00); Answers:gDecimal payment = new BigDecimal(2.00); gDecimal cost = new BigDecimal(1.10); ystem.out.println(payment.subtract(cost)); Answers: a) b) c) d) => 0.89999999991118215802998747... gDecimal payment = new BigDecimal("2.00"); gDecimal cost = new BigDecimal("1.10"); ystem.out.println(payment.subtract(cost)); Answers: a) b) c) d) - basics Simple calculation: If you pay $2.00 for a beer that costs $1.10, Answers: .9 .90 0.899999999999 None of the above Answers:Answers: .9 .90 0.899999999999 None of the above => 0.89999999991118215802998747... Answers: .9 0.90 0.899999999999 None of the above
  • 6. Calculations in Java- Example: Simple calculation: If you pay $2.00 for a beer that costs $1.10, how much changes do you get? System.out.println(Calculator.builder().val(2.00).sub(1.10). m p = new Num(2.00); m c = new Num(1.10);m c = new Num(1.10); tem.out.println(Calculator.builder().val(p).sub(c).calculate m p = new Num("2.00"); m c = new Num("1.10"); tem.out.println(Calculator.builder().val(p).sub(c).setStripTrailingZeros tem.out.println(Calculator.builder("2.00 - 1.10").setStripTrailingZeros - basics Simple calculation: If you pay $2.00 for a beer that costs $1.10, ().val(2.00).sub(1.10).calculate()); Answers: a) 0.9 b) .90 c) 0.899999999999 d) None of the above 0.899999999999 d) None of the above calculate()); Answers: a) .9 b) .90 c) 0.899999999999 d) None of the above setStripTrailingZeros(false).calculate()); setStripTrailingZeros(false).calculate()); Answers: a) .9 b) 0.90 c) 0.89999999 d) None of th 0.9 0.89999999991118215802998747...
  • 7. Complex example Calculate fixed monthly payment for a fixed rate mortgage by Java ecimal interestRate = new BigDecimal("6.5"); // fixed yearly interest rate in % ecimal P = new BigDecimal(200000); ecimal paymentYears = new BigDecimal(30); onthly interest rate => 6.5 / 12 / 100 = 0.0054166667 ecimal r = interestRate.divide(new BigDecimal(12), 10, BigDecimal.ROUND_HALF_UP).divide(new umerator > 0.005416666 * 200000 = 1083.3333400000 ecimal numerator = r.multiply(P); enominatorenominator .add(new BigDecimal(1)); // => 1.0054166667 ecimal pow = new BigDecimal(30 * 12); // N = 30 * 12 > 1.005416666 ^ (-30 * 12) ===> 1 / 1.005416666 ^ (30 * 12) ecimal one = BigDecimal.ONE; ecimal r_pow = r.pow(pow.intValue()); // => 1.0054166667 ^ 360 = 6.99179805731691416804.... w = one.divide(r_pow, 10, BigDecimal.ROUND_HALF_UP); // => 1 / 6.991798.. = 0.1430247258 > 1 - 0.1430247258 = 0.8569752742 ecimal denominator = new BigDecimal(1); minator = denominator.subtract(r_pow); > 1083.3333400000 / 0.8569752742 = 1264.1360522464 ecimal c = numerator.divide(denominator, 10, BigDecimal.ROUND_HALF_UP); .setScale(2, BigDecimal.ROUND_HALF_UP); em.out.println("c = " + c); Calculate fixed monthly payment for a fixed rate mortgage by Java ).divide(new BigDecimal(100), 10, BigDecimal.ROUND_HALF_UP); // => 1.0054166667 ^ 360 = 6.99179805731691416804.... // => 1 / 6.991798.. = 0.1430247258 Line of code: 15
  • 8. Complex example Calculate fixed monthly payment for a fixed rate mortgage by Java m interestRate = new Num(6.5); // fixed yearly interest rate in % m P = new Num(200000); m paymentYears = new Num(30); monthly interest rate : r = 6.5 / 100 / 12 m r = Calculator.builder().openBracket().val(interestRate).div(100).closeBracket().div(12).calculate(); = 30 * 12 * -1 m N = Calculator.builder().val(paymentYears).mul(12).mul(-1).calculate(); = (r * P) / (1 / (1 + r)^N ulator c = new Calculator() = (r * P) / (1 / (1 + r)^N ulator c = new Calculator() .openBracket() .val(r).mul(P) .closeBracket() // numerator .div() // --------------- .openBracket() // denumerator .val(1).sub().openBracket().val(1).add(r).closeBracket .closeBracket(); m result = c.calculate().setScale(2); em.out.println("c = " + result); Line Calculate fixed monthly payment for a fixed rate mortgage by Java ().div(12).calculate(); closeBracket().pow(N) Line of code: 8
  • 9. Complex example Calculate fixed monthly payment for a fixed rate mortgage by Java m interestRate = new Num("A", 6.5); m P = new Num("B", 200000); m paymentYears = new Num("C", -30); ulator c = Calculator.builder("((A / 100 / 12) * B) / (1 - ((1 + (A / 100 / 12)) ^ (C * 12)))", m result = c.calculate(); em.out.println("c = " + result.setScale(2)); Line Calculate fixed monthly payment for a fixed rate mortgage by Java ((1 + (A / 100 / 12)) ^ (C * 12)))", interestRate, P, paymentYears); Line of code: 6
  • 10. Feature: Show calculation Num interestRate = new Num("A", 6.5); Num P = new Num("B", 200000); Num paymentYears = new Num("C", -30); Calculator c = Calculator.builder("((A / 100 / 12) * B) / (1 - ((1 + (A / 100 / 12)) ^ (C * 12)))", c.setScale(10); Num result = c.calculate(true, false); // track calculation steps, track details for(String step : c.getCalculationSteps()) System.out.println(step); System.out.println("c = " + result.setScale(2)); Output: 6.5 / 100 = 0.065 0.065/ 12 = 0.0054166667 0.0054166667 * 200000 6.5 / 100 = 0.065 0.065/ 12 = 0.0054166667 1 + 0.0054166667 -30 * 12 = -360 1.0054166667 ^ -360 1 - 0.1430247258 1083.33334/ 0.8569752742 c = 1264.14 calculation steps ((1 + (A / 100 / 12)) ^ (C * 12)))", interestRate, P, paymentYears); = 0.065 = 0.0054166667 * 200000 = 1083.33334 = 0.065 = 0.0054166667 + 0.0054166667 = 1.0054166667 360 = 0.1430247258 = 0.8569752742 / 0.8569752742 = 1264.1360522464
  • 11. Feature: Modularity Calculator calc = new Calculator(); calc.register(QuestionOperator.class); // register custom operator '?' calc.register(SumFunction.class); // register custom function 'sum' calc.expression("2 ? 2 + 5 - 1 + sum(1,2,3,4)"); @SingletonComponent@SingletonComponent public class QuestionOperator implements Operator { .... // module for ‘?’ operator .... } @SingletonComponent public class SumFunction implements Function { .... // module for function ‘sum’ .... } // register custom operator '?' register custom function 'sum' implements Operator {
  • 12. Feature: Default configuration roundingMode=HALF_UP scale=2 stripTrailingZeros=true decimalSeparator.out='.' decimalSeparator.in='.' numconverter[0]=org.jdice.calc.test.NumTest$CustomObject > org.jdice.calc.test.NumTest$CustomObjectNumConverter Configure default properties with 'jcalc.properties' file in class path numconverter[0]=org.jdice.calc.test.NumTest$CustomObject > org.jdice.calc.test.NumTest$CustomObjectNumConverter operator[0]=org.jdice.calc.test.CustomOperatorFunctionTest$QuestionOperator function[0]=org.jdice.calc.test.CustomOperatorFunctionTest$SumFunction configuration org.jdice.calc.test.NumTest$CustomObjectNumConverter ' file in class path org.jdice.calc.test.NumTest$CustomObjectNumConverter org.jdice.calc.test.CustomOperatorFunctionTest$QuestionOperator org.jdice.calc.test.CustomOperatorFunctionTest$SumFunction
  • 13. ions, ideas, suggestions… Project page: www.jdice.org