0
  5   ˆl–Ü4ý( ©¤ýÔâ�ÆÝ¸©‹Fÿ�þB g¯�ùeóÂƒh¹ÁÀ¿      0
  /   ˆ{‹„„-i[D<†ªoZƒ›Ù«Ã494_‘I|¥‰ÓMdœv ©ƒ†ü+=ÃÂ î    ‹      Õ”QoÓ0Çß÷)Œxk/iH›c4šJTtmÕ!„xpc7±–Ø‘}m)Ÿ§é´µ$†ÄKîœü|÷ÿ_d³ét°ø<’÷‹Û1™}|7í |ê ÒEÚ~¸ìF1ÀpB	-ë+€ívÛÝö»Öå°˜C�Uy	�Î°+QR~Ášwü‚°B	"a¨±T|d¤úFìŠ€]£×R…};Rmt¦|“£ª R•u»Cˆã>+UY½~Òé�rMÞƒÂb]®smñÐýØÒÊ]##~®–¡òÞ–Xî;7©ã²¥ÎMBÑÖ”3]åÄ»,¡ 3k<,Kaî»¹^Q"JLè—Ñ`ú5p€E³›3A
§V	};H&×Ó$¥|"*Å@œfnsCùXx$••z¥•<ßµð�þ~¾`Ú2©ò™Ó5jkQ�­f¶ôµ^_…;¦ZDþj"{2ŒÙÍ|8Y¤£y;Ù”xT÷W~ å3á”A’j§2ðÁ_Ûì¥YúúúaIê�Î¤œ�9Iþ�åµ¹7vkŽ]‡‰žô»º¤¼yKüIS/ê½îÄq§“(ºêE„œÃ)þðÅ{¨(ß‡ÿP>
—«Ð¶�Ïoà7OîûŽA{Ïþ À+!ãÊ        ˆÆ‘äÇò 8àð@ûBu¶ŸÅƒh¹ÄÃÂ      0
  C   	ˆl–Ãa¾”êh¥2 ¸&®6â˜´o�þD0�få �-Æ1 ÏÆ„qïÅ_‹I|¥�+ýÿ¹ä³ÅÄ *    	//  Copyright John Maddock 2006, 2007.
//  Copyright Paul A. Bristow 2006, 2007.

//  Use, modification and distribution are subject to the
//  Boost Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_STATS_NORMAL_HPP
#define BOOST_STATS_NORMAL_HPP

// http://en.wikipedia.org/wiki/Normal_distribution
// http://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm
// Also:
// Weisstein, Eric W. "Normal Distribution."
// From MathWorld--A Wolfram Web Resource.
// http://mathworld.wolfram.com/NormalDistribution.html

#include <boost/math/distributions/fwd.hpp>
#include <boost/math/special_functions/erf.hpp> // for erf/erfc.
#include <boost/math/distributions/complement.hpp>
#include <boost/math/distributions/detail/common_error_handling.hpp>

#include <utility>

namespace boost{ namespace math{

template <class RealType = double, class Policy = policies::policy<> >
class normal_distribution
{
public:
   typedef RealType value_type;
   typedef Policy policy_type;

   normal_distribution(RealType l_mean = 0, RealType sd = 1)
      : m_mean(l_mean), m_sd(sd)
   { // Default is a 'standard' normal distribution N01.
     static const char* function = "boost::math::normal_distribution<%1%>::normal_distribution";

     RealType result;
     detail::check_scale(function, sd, &result, Policy());
     detail::check_location(function, l_mean, &result, Policy());
   }

   RealType mean()const
   { // alias for location.
      return m_mean;
   }

   RealType standard_deviation()const
   { // alias for scale.
      return m_sd;
   }

   // Synonyms, provided to allow generic use of find_location and find_scale.
   RealType location()const
   { // location.
      return m_mean;
   }
   RealType scale()const
   { // scale.
      return m_sd;
   }

private:
   //
   // Data members:
   //
   RealType m_mean;  // distribution mean or location.
   RealType m_sd;    // distribution standard deviation or scale.
}; // class normal_distribution

typedef normal_distribution<double> normal;

#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4127)
#endif

template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const normal_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
  if (std::numeric_limits<RealType>::has_infinity)
  { 
     return std::pair<RealType, RealType>(-std::numeric_limits<RealType>::infinity(), std::numeric_limits<RealType>::infinity()); // - to + infinity.
  }
  else
  { // Can only use max_value.
    using boost::math::tools::max_value;
    return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>()); // - to + max value.
  }
}

template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const normal_distribution<RealType, Policy>& /*dist*/)
{ // This is range values for random variable x where cdf rises from 0 to 1, and outside it, the pdf is zero.
  if (std::numeric_limits<RealType>::has_infinity)
  { 
     return std::pair<RealType, RealType>(-std::numeric_limits<RealType>::infinity(), std::numeric_limits<RealType>::infinity()); // - to + infinity.
  }
  else
  { // Can only use max_value.
   using boost::math::tools::max_value;
   ret