Browse Source

refactoring:binomial_coefficient

main
fdai6887 2 years ago
parent
commit
353ededd91
  1. BIN
      build/test/out/c/funktion.o
  2. BIN
      build/test/out/test_Akkortrichtsatz.out
  3. BIN
      build/test/out/test_Anlagenabnutzungsgrad.out
  4. BIN
      build/test/out/test_Anlagenintensitaet.out
  5. BIN
      build/test/out/test_Anlagenproduktivitaet.out
  6. BIN
      build/test/out/test_Arbeitsproduktivitaet.out
  7. BIN
      build/test/out/test_Cashflow_zu_Gesamtkapital.out
  8. BIN
      build/test/out/test_Dynamische_Amortisationszeit.out
  9. BIN
      build/test/out/test_Effektivverzinsung.out
  10. BIN
      build/test/out/test_Finanzierungsregeln.out
  11. BIN
      build/test/out/test_GewinnMaximum.out
  12. BIN
      build/test/out/test_Kalkulatorische_Zinsen.out
  13. BIN
      build/test/out/test_Kritische_Menge.out
  14. BIN
      build/test/out/test_Stueckzeitakkort.out
  15. BIN
      build/test/out/test_Vadd.out
  16. BIN
      build/test/out/test_Vaddx2.out
  17. BIN
      build/test/out/test_Vaddx3.out
  18. BIN
      build/test/out/test_Vangle.out
  19. BIN
      build/test/out/test_Vlength.out
  20. BIN
      build/test/out/test_Vmiddle.out
  21. BIN
      build/test/out/test_Vmiddle2.out
  22. BIN
      build/test/out/test_Vmiddle3.out
  23. BIN
      build/test/out/test_Vmultiplier.out
  24. BIN
      build/test/out/test_Vmultiplier2.out
  25. BIN
      build/test/out/test_Vmultiplier3.out
  26. BIN
      build/test/out/test_Vparallel.out
  27. BIN
      build/test/out/test_Vshift.out
  28. BIN
      build/test/out/test_Vskalort.out
  29. BIN
      build/test/out/test_Vsubstract.out
  30. BIN
      build/test/out/test_Vsubstract2.out
  31. BIN
      build/test/out/test_Vsubstract3.out
  32. BIN
      build/test/out/test_Zeitlohn.out
  33. BIN
      build/test/out/test_angebotserfolg.out
  34. BIN
      build/test/out/test_binomial_coefficient.out
  35. BIN
      build/test/out/test_eigenkapital_Rentabilitaeten.out
  36. BIN
      build/test/out/test_erloesfunktion.out
  37. BIN
      build/test/out/test_gesamtkapital_Rentabilitaeten.out
  38. BIN
      build/test/out/test_grenzGewinn.out
  39. BIN
      build/test/out/test_marktanteil.out
  40. BIN
      build/test/out/test_probability_from_tree.out
  41. BIN
      build/test/out/test_trapezFlaeche.out
  42. BIN
      build/test/out/test_vPunkt.out
  43. 2
      build/test/results/test_Akkortrichtsatz.pass
  44. 2
      build/test/results/test_Anlagenabnutzungsgrad.pass
  45. 2
      build/test/results/test_Anlagenintensitaet.pass
  46. 2
      build/test/results/test_Anlagenproduktivitaet.pass
  47. 2
      build/test/results/test_Arbeitsproduktivitaet.pass
  48. 2
      build/test/results/test_Cashflow_zu_Gesamtkapital.pass
  49. 2
      build/test/results/test_Dynamische_Amortisationszeit.pass
  50. 2
      build/test/results/test_Effektivverzinsung.pass
  51. 2
      build/test/results/test_Finanzierungsregeln.pass
  52. 2
      build/test/results/test_GewinnMaximum.pass
  53. 2
      build/test/results/test_Kalkulatorische_Zinsen.pass
  54. 2
      build/test/results/test_Kritische_Menge.pass
  55. 2
      build/test/results/test_Stueckzeitakkort.pass
  56. 2
      build/test/results/test_Vadd.pass
  57. 2
      build/test/results/test_Vaddx2.pass
  58. 2
      build/test/results/test_Vaddx3.pass
  59. 2
      build/test/results/test_Vangle.pass
  60. 2
      build/test/results/test_Vlength.pass
  61. 2
      build/test/results/test_Vmiddle.pass
  62. 2
      build/test/results/test_Vmiddle2.pass
  63. 2
      build/test/results/test_Vmiddle3.pass
  64. 2
      build/test/results/test_Vmultiplier.pass
  65. 2
      build/test/results/test_Vmultiplier2.pass
  66. 2
      build/test/results/test_Vmultiplier3.pass
  67. 2
      build/test/results/test_Vparallel.pass
  68. 2
      build/test/results/test_Vshift.pass
  69. 2
      build/test/results/test_Vskalort.pass
  70. 2
      build/test/results/test_Vsubstract.pass
  71. 2
      build/test/results/test_Vsubstract2.pass
  72. 2
      build/test/results/test_Vsubstract3.pass
  73. 2
      build/test/results/test_Zeitlohn.pass
  74. 2
      build/test/results/test_angebotserfolg.pass
  75. 3
      build/test/results/test_binomial_coefficient.pass
  76. 2
      build/test/results/test_eigenkapital_Rentabilitaeten.pass
  77. 2
      build/test/results/test_erloesfunktion.pass
  78. 2
      build/test/results/test_gesamtkapital_Rentabilitaeten.pass
  79. 2
      build/test/results/test_grenzGewinn.pass
  80. 2
      build/test/results/test_marktanteil.pass
  81. 2
      build/test/results/test_probability_from_tree.pass
  82. 2
      build/test/results/test_trapezFlaeche.pass
  83. 2
      build/test/results/test_vPunkt.pass
  84. 1
      src/funktion.c
  85. 1
      src/main.c
  86. BIN
      team.md

BIN
build/test/out/c/funktion.o

BIN
build/test/out/test_Akkortrichtsatz.out

BIN
build/test/out/test_Anlagenabnutzungsgrad.out

BIN
build/test/out/test_Anlagenintensitaet.out

BIN
build/test/out/test_Anlagenproduktivitaet.out

BIN
build/test/out/test_Arbeitsproduktivitaet.out

BIN
build/test/out/test_Cashflow_zu_Gesamtkapital.out

BIN
build/test/out/test_Dynamische_Amortisationszeit.out

BIN
build/test/out/test_Effektivverzinsung.out

BIN
build/test/out/test_Finanzierungsregeln.out

BIN
build/test/out/test_GewinnMaximum.out

BIN
build/test/out/test_Kalkulatorische_Zinsen.out

BIN
build/test/out/test_Kritische_Menge.out

BIN
build/test/out/test_Stueckzeitakkort.out

BIN
build/test/out/test_Vadd.out

BIN
build/test/out/test_Vaddx2.out

BIN
build/test/out/test_Vaddx3.out

BIN
build/test/out/test_Vangle.out

BIN
build/test/out/test_Vlength.out

BIN
build/test/out/test_Vmiddle.out

BIN
build/test/out/test_Vmiddle2.out

BIN
build/test/out/test_Vmiddle3.out

BIN
build/test/out/test_Vmultiplier.out

BIN
build/test/out/test_Vmultiplier2.out

BIN
build/test/out/test_Vmultiplier3.out

BIN
build/test/out/test_Vparallel.out

BIN
build/test/out/test_Vshift.out

BIN
build/test/out/test_Vskalort.out

BIN
build/test/out/test_Vsubstract.out

BIN
build/test/out/test_Vsubstract2.out

BIN
build/test/out/test_Vsubstract3.out

BIN
build/test/out/test_Zeitlohn.out

BIN
build/test/out/test_angebotserfolg.out

BIN
build/test/out/test_binomial_coefficient.out

BIN
build/test/out/test_eigenkapital_Rentabilitaeten.out

BIN
build/test/out/test_erloesfunktion.out

BIN
build/test/out/test_gesamtkapital_Rentabilitaeten.out

BIN
build/test/out/test_grenzGewinn.out

BIN
build/test/out/test_marktanteil.out

BIN
build/test/out/test_probability_from_tree.out

BIN
build/test/out/test_trapezFlaeche.out

BIN
build/test/out/test_vPunkt.out

2
build/test/results/test_Akkortrichtsatz.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 552.000000
:time: 0.0017804130002332386
:time: 0.001761557999998331

2
build/test/results/test_Anlagenabnutzungsgrad.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 60.000000
:time: 0.00491794099980325
:time: 0.0021446160008053994

2
build/test/results/test_Anlagenintensitaet.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 4878.048780
:time: 0.003222309998818673
:time: 0.00189514900012

2
build/test/results/test_Anlagenproduktivitaet.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 18.203304
:time: 0.003931907000151114
:time: 0.0028041349996783538

2
build/test/results/test_Arbeitsproduktivitaet.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 60.000000
:time: 0.0018627720000949921
:time: 0.0017782340000849217

2
build/test/results/test_Cashflow_zu_Gesamtkapital.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 0.158038
:time: 0.005546435000724159
:time: 0.0019877250015269965

2
build/test/results/test_Dynamische_Amortisationszeit.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 189.421906
:time: 0.0018890200008172542
:time: 0.0019505410000419943

2
build/test/results/test_Effektivverzinsung.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 16.034390
:time: 0.0016974339996522758
:time: 0.004336714999226388

2
build/test/results/test_Finanzierungsregeln.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 0.051041
:time: 0.0014716960013174685
:time: 0.002983173999382416

2
build/test/results/test_GewinnMaximum.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 251.000000
:time: 0.001646841001274879
:time: 0.001606047999302973

2
build/test/results/test_Kalkulatorische_Zinsen.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 1.440000
:time: 0.0018257169995195
:time: 0.001648126999498345

2
build/test/results/test_Kritische_Menge.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss -12.096026
:time: 0.002026236999881803
:time: 0.0031450299993593944

2
build/test/results/test_Stueckzeitakkort.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- '96600.000000'
:time: 0.002102997999827494
:time: 0.003909514000042691

2
build/test/results/test_Vadd.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0026261009988957085
:time: 0.0030360079999809386

2
build/test/results/test_Vaddx2.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.005395653999585193
:time: 0.0015205409999907715

2
build/test/results/test_Vaddx3.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0015696239988756133
:time: 0.005406865999248112

2
build/test/results/test_Vangle.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0016816280003695283
:time: 0.0017805900006351294

2
build/test/results/test_Vlength.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.001683295000475482
:time: 0.0017829239986895118

2
build/test/results/test_Vmiddle.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0016756210006860783
:time: 0.0022317710008792346

2
build/test/results/test_Vmiddle2.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0015711260002717609
:time: 0.0024374549993808614

2
build/test/results/test_Vmiddle3.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0018666260002646595
:time: 0.001756851999743958

2
build/test/results/test_Vmultiplier.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0018209059999207966
:time: 0.002135062999514048

2
build/test/results/test_Vmultiplier2.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0032439990009152098
:time: 0.0023879840009612963

2
build/test/results/test_Vmultiplier3.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.002459958001054474
:time: 0.001585478999913903

2
build/test/results/test_Vparallel.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0025641580014053034
:time: 0.0019305590012663743

2
build/test/results/test_Vshift.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.001945666999745299
:time: 0.004239556999891647

2
build/test/results/test_Vskalort.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.001544736000141711
:time: 0.001731761998598813

2
build/test/results/test_Vsubstract.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.002150717999029439
:time: 0.0025617459996283287

2
build/test/results/test_Vsubstract2.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0018433610002830392
:time: 0.0017148059996543452

2
build/test/results/test_Vsubstract3.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0021236239990685135
:time: 0.003085691001615487

2
build/test/results/test_Zeitlohn.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 3450.000000
:time: 0.001939702000527177
:time: 0.001809663999665645

2
build/test/results/test_angebotserfolg.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 225.000000
:time: 0.0016371870005968958
:time: 0.0018674390012165532

3
build/test/results/test_binomial_coefficient.pass

@ -15,6 +15,5 @@
:failed: 0
:ignored: 0
:stdout:
- The binomial coefficient C(2, -1) is 1
- Testergebniss 1
:time: 0.002219015999799012
:time: 0.002445379999699071

2
build/test/results/test_eigenkapital_Rentabilitaeten.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 62.500000
:time: 0.00194221800120431
:time: 0.0016374919996451354

2
build/test/results/test_erloesfunktion.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 4000.000000
:time: 0.001711550999971223
:time: 0.002038440999967861

2
build/test/results/test_gesamtkapital_Rentabilitaeten.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 27.136929
:time: 0.0017669599983491935
:time: 0.00298699800077884

2
build/test/results/test_grenzGewinn.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 1141.000000
:time: 0.0018872260006901342
:time: 0.0017009420007525478

2
build/test/results/test_marktanteil.pass

@ -16,4 +16,4 @@
:ignored: 0
:stdout:
- Testergebniss 21.739130
:time: 0.0021236690008663572
:time: 0.0026781649994518375

2
build/test/results/test_probability_from_tree.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0018104690007021418
:time: 0.003882367998812697

2
build/test/results/test_trapezFlaeche.pass

@ -17,4 +17,4 @@
:stdout:
- 'Flaeche vom Trapez beträgt: 21.000000'
- Testergebniss 21.000000
:time: 0.001722078000966576
:time: 0.0022368500012817094

2
build/test/results/test_vPunkt.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.003141678000247339
:time: 0.0017837289997260086

1
src/funktion.c

@ -262,6 +262,5 @@ int binomial_coefficient(int n, int k) {
for (int i = 0; i < k; ++i) {
result = result * (n - i) / (i + 1);
}
printf("The binomial coefficient C(%d, %d) is %d\n", n, k, result);
return result;
}

1
src/main.c

@ -201,7 +201,6 @@ int main()
z = getValue('B');
probability_from_tree(x, y, z);
printf("Enter a and b to calculate the binomial coefficient: ");
a = getValue('a');
b = getValue('b')
binomial_coefficient(a, b);

BIN
team.md

Loading…
Cancel
Save