Cody

# Problem 953. Pi Estimate 1

Solution 2021122

Submitted on 14 Nov 2019 by Sinh Luong
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x = 10; y_correct = 3.041840000000000; assert(isequal(pi_est1(x),y_correct))

estimate = 0 estimate = 1 estimate = 0.6667 estimate = 0.8667 estimate = 0.7238 estimate = 0.8349 estimate = 0.7440 estimate = 0.8209 estimate = 0.7543 estimate = 0.8131 estimate = 0.7605

2   Pass
x = 1000; y_correct = 3.140593000000000; assert(isequal(pi_est1(x),y_correct))

estimate = 0 estimate = 1 estimate = 0.6667 estimate = 0.8667 estimate = 0.7238 estimate = 0.8349 estimate = 0.7440 estimate = 0.8209 estimate = 0.7543 estimate = 0.8131 estimate = 0.7605 estimate = 0.8081 estimate = 0.7646 estimate = 0.8046 estimate = 0.7676 estimate = 0.8020 estimate = 0.7698 estimate = 0.8001 estimate = 0.7715 estimate = 0.7985 estimate = 0.7729 estimate = 0.7973 estimate = 0.7740 estimate = 0.7963 estimate = 0.7750 estimate = 0.7954 estimate = 0.7758 estimate = 0.7947 estimate = 0.7765 estimate = 0.7940 estimate = 0.7771 estimate = 0.7935 estimate = 0.7776 estimate = 0.7930 estimate = 0.7780 estimate = 0.7925 estimate = 0.7785 estimate = 0.7922 estimate = 0.7788 estimate = 0.7918 estimate = 0.7791 estimate = 0.7915 estimate = 0.7794 estimate = 0.7912 estimate = 0.7797 estimate = 0.7910 estimate = 0.7800 estimate = 0.7907 estimate = 0.7802 estimate = 0.7905 estimate = 0.7804 estimate = 0.7903 estimate = 0.7806 estimate = 0.7901 estimate = 0.7808 estimate = 0.7899 estimate = 0.7809 estimate = 0.7898 estimate = 0.7811 estimate = 0.7896 estimate = 0.7812 estimate = 0.7895 estimate = 0.7814 estimate = 0.7894 estimate = 0.7815 estimate = 0.7892 estimate = 0.7816 estimate = 0.7891 estimate = 0.7817 estimate = 0.7890 estimate = 0.7818 estimate = 0.7889 estimate = 0.7819 estimate = 0.7888 estimate = 0.7820 estimate = 0.7887 estimate = 0.7821 estimate = 0.7886 estimate = 0.7822 estimate = 0.7886 estimate = 0.7823 estimate = 0.7885 estimate = 0.7823 estimate = 0.7884 estimate = 0.7824 estimate = 0.7883 estimate = 0.7825 estimate = 0.7883 estimate = 0.7826 estimate = 0.7882 estimate = 0.7826 estimate = 0.7881 estimate = 0.7827 estimate = 0.7881 estimate = 0.7827 estimate = 0.7880 estimate = 0.7828 estimate = 0.7880 estimate = 0.7828 estimate = 0.7879 estimate = 0.7829 estimate = 0.7879 estimate = 0.7829 estimate = 0.7878 estimate = 0.7830 estimate = 0.7878 estimate = 0.7830 estimate = 0.7877 estimate = 0.7831 estimate = 0.7877 estimate = 0.7831 estimate = 0.7877 estimate = 0.7832 estimate = 0.7876 estimate = 0.7832 estimate = 0.7876 estimate = 0.7832 estimate = 0.7875 estimate = 0.7833 estimate = 0.7875 estimate = 0.7833 estimate = 0.7875 estimate = 0.7833 estimate = 0.7874 estimate = 0.7834 estimate = 0.7874 estimate = 0.7834 estimate = 0.7874 estimate = 0.7834 estimate = 0.7873 estimate = 0.7835 estimate = 0.7873 estimate = 0.7835 estimate = 0.7873 estimate = 0.7835 estimate = 0.7872 estimate = 0.7836 estimate = 0.7872 estimate = 0.7836 estimate = 0.7872 estimate = 0.7836 estimate = 0.7872 estimate = 0.7836 estimate = 0.7871 estimate = 0.7837 estimate = 0.7871 estimate = 0.7837 estimate = 0.7871 estimate = 0.7837 estimate = 0.7871 estimate = 0.7837 estimate = 0.7871 estimate = 0.7838 estimate = 0.7870 estimate = 0.7838 estimate = 0.7870 estimate = 0.7838 estimate = 0.7870 estimate = 0.7838 estimate = 0.7870 estimate = 0.7838 estimate = 0.7870 estimate = 0.7839 estimate = 0.7869 estimate = 0.7839 estimate = 0.7869 estimate = 0.7839 estimate = 0.7869 estimate = 0.7839 estimate = 0.7869 estimate = 0.7839 estimate = 0.7869 estimate = 0.7839 estimate = 0.7868 estimate = 0.7840 estimate = 0.7868 estimate = 0.7840 estimate = 0.7868 estimate = 0.7840 estimate = 0.7868 estimate = 0.7840 estimate = 0.7868 estimate = 0.7840 estimate = 0.7868 estimate = 0.7840 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7861 estimate = 0.7846 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate...

3   Pass
x = 1e6; y_correct = 3.141592000000000; assert(isequal(pi_est1(x),y_correct))

estimate = 0 estimate = 1 estimate = 0.6667 estimate = 0.8667 estimate = 0.7238 estimate = 0.8349 estimate = 0.7440 estimate = 0.8209 estimate = 0.7543 estimate = 0.8131 estimate = 0.7605 estimate = 0.8081 estimate = 0.7646 estimate = 0.8046 estimate = 0.7676 estimate = 0.8020 estimate = 0.7698 estimate = 0.8001 estimate = 0.7715 estimate = 0.7985 estimate = 0.7729 estimate = 0.7973 estimate = 0.7740 estimate = 0.7963 estimate = 0.7750 estimate = 0.7954 estimate = 0.7758 estimate = 0.7947 estimate = 0.7765 estimate = 0.7940 estimate = 0.7771 estimate = 0.7935 estimate = 0.7776 estimate = 0.7930 estimate = 0.7780 estimate = 0.7925 estimate = 0.7785 estimate = 0.7922 estimate = 0.7788 estimate = 0.7918 estimate = 0.7791 estimate = 0.7915 estimate = 0.7794 estimate = 0.7912 estimate = 0.7797 estimate = 0.7910 estimate = 0.7800 estimate = 0.7907 estimate = 0.7802 estimate = 0.7905 estimate = 0.7804 estimate = 0.7903 estimate = 0.7806 estimate = 0.7901 estimate = 0.7808 estimate = 0.7899 estimate = 0.7809 estimate = 0.7898 estimate = 0.7811 estimate = 0.7896 estimate = 0.7812 estimate = 0.7895 estimate = 0.7814 estimate = 0.7894 estimate = 0.7815 estimate = 0.7892 estimate = 0.7816 estimate = 0.7891 estimate = 0.7817 estimate = 0.7890 estimate = 0.7818 estimate = 0.7889 estimate = 0.7819 estimate = 0.7888 estimate = 0.7820 estimate = 0.7887 estimate = 0.7821 estimate = 0.7886 estimate = 0.7822 estimate = 0.7886 estimate = 0.7823 estimate = 0.7885 estimate = 0.7823 estimate = 0.7884 estimate = 0.7824 estimate = 0.7883 estimate = 0.7825 estimate = 0.7883 estimate = 0.7826 estimate = 0.7882 estimate = 0.7826 estimate = 0.7881 estimate = 0.7827 estimate = 0.7881 estimate = 0.7827 estimate = 0.7880 estimate = 0.7828 estimate = 0.7880 estimate = 0.7828 estimate = 0.7879 estimate = 0.7829 estimate = 0.7879 estimate = 0.7829 estimate = 0.7878 estimate = 0.7830 estimate = 0.7878 estimate = 0.7830 estimate = 0.7877 estimate = 0.7831 estimate = 0.7877 estimate = 0.7831 estimate = 0.7877 estimate = 0.7832 estimate = 0.7876 estimate = 0.7832 estimate = 0.7876 estimate = 0.7832 estimate = 0.7875 estimate = 0.7833 estimate = 0.7875 estimate = 0.7833 estimate = 0.7875 estimate = 0.7833 estimate = 0.7874 estimate = 0.7834 estimate = 0.7874 estimate = 0.7834 estimate = 0.7874 estimate = 0.7834 estimate = 0.7873 estimate = 0.7835 estimate = 0.7873 estimate = 0.7835 estimate = 0.7873 estimate = 0.7835 estimate = 0.7872 estimate = 0.7836 estimate = 0.7872 estimate = 0.7836 estimate = 0.7872 estimate = 0.7836 estimate = 0.7872 estimate = 0.7836 estimate = 0.7871 estimate = 0.7837 estimate = 0.7871 estimate = 0.7837 estimate = 0.7871 estimate = 0.7837 estimate = 0.7871 estimate = 0.7837 estimate = 0.7871 estimate = 0.7838 estimate = 0.7870 estimate = 0.7838 estimate = 0.7870 estimate = 0.7838 estimate = 0.7870 estimate = 0.7838 estimate = 0.7870 estimate = 0.7838 estimate = 0.7870 estimate = 0.7839 estimate = 0.7869 estimate = 0.7839 estimate = 0.7869 estimate = 0.7839 estimate = 0.7869 estimate = 0.7839 estimate = 0.7869 estimate = 0.7839 estimate = 0.7869 estimate = 0.7839 estimate = 0.7868 estimate = 0.7840 estimate = 0.7868 estimate = 0.7840 estimate = 0.7868 estimate = 0.7840 estimate = 0.7868 estimate = 0.7840 estimate = 0.7868 estimate = 0.7840 estimate = 0.7868 estimate = 0.7840 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7867 estimate = 0.7841 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7842 estimate = 0.7866 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7865 estimate = 0.7843 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7864 estimate = 0.7844 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7863 estimate = 0.7845 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7862 estimate = 0.7846 estimate = 0.7861 estimate = 0.7846 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7861 estimate = 0.7847 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate = 0.7848 estimate = 0.7860 estimate...