| OLD | NEW |
| 1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 import 'dart:math'; | 5 import 'dart:math'; |
| 6 import 'package:expect/expect.dart'; | 6 import 'package:expect/expect.dart'; |
| 7 | 7 |
| 8 // Chi squared for getting m 0s out of n bits. | 8 // Chi squared for getting m 0s out of n bits. |
| 9 double ChiSquared(int m, int n) { | 9 double ChiSquared(int m, int n) { |
| 10 double ys_minus_np1 = (m - n/2.0); | 10 double ys_minus_np1 = (m - n/2.0); |
| 11 double chi_squared_1 = ys_minus_np1 * ys_minus_np1 * 2.0 / n; | 11 double chi_squared_1 = ys_minus_np1 * ys_minus_np1 * 2.0 / n; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 } | 153 } |
| 154 | 154 |
| 155 void main() { | 155 void main() { |
| 156 BitCorrelations(); | 156 BitCorrelations(); |
| 157 GetBoolTest(); | 157 GetBoolTest(); |
| 158 GetDoubleTest(); | 158 GetDoubleTest(); |
| 159 NonPowerOfTwoTest(); | 159 NonPowerOfTwoTest(); |
| 160 SeedOutput(); | 160 SeedOutput(); |
| 161 } | 161 } |
| 162 | 162 |
| OLD | NEW |