Advertisement
cd62131

BigFloat

Feb 1st, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.45 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use Math::BigFloat;
  5. use feature 'say';
  6.  
  7. my $m = Math::BigFloat->new('1.673E-27');
  8. my $c = Math::BigFloat->new('3E8');
  9. my $k = Math::BigFloat->new('1.38E-23');
  10. my $T = Math::BigFloat->new('1.4E11');
  11. my $mu = Math::BigFloat->new('-0.1E-10');
  12. say my $E = - $m * $c * $c;
  13.  
  14. my $e = Math::BigFloat->bone()->bexp();
  15. my $x1 = ($E - $mu) / ($k * $T);
  16. my $x2 = Math::BigFloat->bone();
  17. say $x2 / ($x2 + $e ** $x1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement