• ## In depth understanding of the use of BigDecimal

Time：2020-2-8

What is BigDecimal BigDecimalIt can represent a floating-point number of any size with full accuracy. Why use BigDecimal instead of double Talk is cheap, Show me the Code. Example 1: double d1 = 0.3; double d2 = 0.2; System.out.println(“Double:\t 0,3 – 0,2 = ” + (d1 – d2)); float f1 = 0.3f; float f2 = […]

• ## Matrix multiplication optimization

Time：2019-12-21

Preface From Xudong’s blog, I saw a blog: matrix multiplication optimization combined with dynamic programming solution, which is quite interesting. Here’s a reprint [slightly modified]. problem Matrix multiplication satisfies the combination law, but not the commutation law. For example, matrix \$a {AB}, B {BC}, C {CD} \$are multiplied to get matrix \$s {ad}\$ \[ S_{ad}=A_{ab} B_{bc} […]

• ## C-nested loop

Time：2019-11-21

I. Introduction Nested loops: while, for, and do… While loops use one or more nesting. Two. Example Output multiplication table (nesting of loops) //Multiplication formula for (int i = 1; i <= 9; i++) { for (int j = 1; j <= i; j++) { Console.Write(“{0}*{1}={2}\t”, i, j, i * j); } Console. Writeline(); // […]