Hola a todos, hoy vamos a realizar una modificación al último programa que creamos y que servía para calcular la Serie de Fibonacci. En aquella oportunidad, utilizamos el tipo de dato long, para almacenar los términos de la serie. Como lo van a ver en el video, este tipo de dato permite almacenar y operar con valores enteros que estén entre un rango (ver este link) lo que hace que cuando necesitemos calcular el término 100 de la serie, nuestro programa falle. Para solucionarlo, y poder llegar a calcular incluso el término 100.000 de la serie, vamos a ajustar nuestro programa, reemplazando el tipo long, por la construcción de objetos de la clase BigDecimal, que podemos encontrar en: java.math.BigDecimal.
Blog sobre finanzas, excel, vba, sql, matemática financiera y más
sábado, 26 de septiembre de 2020
Calculando la Serie de Fibonacci con Java - Usando la Clase BigDecimal java.math.BigDecimal
Una de las motivaciones para realizar este ajuste, surgió después de visitar en twitter a @iamPisano, que como pueden ver, se da a la tarea de calcular cada uno de los términos de la serie y los postea día a día. Solo que debemos tener en cuenta, que para este caso puntual en twitter, la serie no inicia en 0 como primer término, sino que lo hace en 1 :
Veamos entonces los ajustes que hay que realizar al programa:
El resultado del término 100.000 de la serie es: 1.605.285.768.272.981.969.703.501.699.166.323.590.285.867.163.980.464.844.832.239.016.803.082.277.106.148.858.007.382.799.983.341.986.487.069.902.980.550.885.975.477.322.351.434.706.230.637.004.409.049.784.072.899.949.196.507.083.084.156.794.116.251.699.801.486.721.736.223.390.722.427.570.186.888.655.751.529.235.613.410.338.408.870.193.727.569.971.527.403.943.276.390.636.566.571.870.291.873.364.726.912.281.315.045.657.377.080.452.296.641.014.550.702.767.029.410.145.444.194.902.043.334.906.137.465.258.645.364.555.071.992.099.303.047.847.552.914.338.861.950.758.012.905.861.458.304.822.952.983.798.347.708.234.849.961.877.892.581.500.487.104.329.912.897.053.787.202.478.194.803.251.250.973.191.854.369.361.609.443.319.395.284.823.520.448.940.840.651.775.732.907.644.074.930.230.290.374.431.944.669.276.579.201.082.329.022.167.437.000.540.178.184.976.161.661.514.705.005.605.252.150.134.472.235.679.948.230.522.246.450.783.383.505.595.174.189.526.726.407.243.536.143.199.261.274.616.730.010.032.991.043.429.007.848.793.212.103.106.980.237.721.076.343.555.337.313.557.523.933.541.011.980.094.972.016.608.642.899.965.136.223.294.935.842.250.390.250.828.259.889.570.870.033.963.187.596.647.568.293.443.342.410.158.531.081.233.044.913.682.653.199.471.625.481.578.504.171.408.327.887.892.606.534.538.046.526.227.539.584.258.299.526.342.312.407.738.333.210.781.604.982.633.545.495.888.491.561.087.898.934.709.982.167.880.030.332.285.876.102.262.358.067.160.003.937.460.024.447.386.489.060.064.938.005.924.808.194.248.140.558.002.201.840.110.628.892.078.612.055.443.438.221.578.862.498.291.300.651.383.928.584.373.984.902.581.102.658.641.829.978.112.304.456.574.513.448.241.227.250.220.543.913.281.700.290.495.475.408.052.707.795.147.547.800.588.002.895.958.860.368.311.598.042.365.046.277.866.614.673.101.609.444.339.885.617.748.915.603.839.452.726.352.490.607.877.574.219.728.913.916.976.759.172.161.942.512.702.106.521.906.799.710.381.230.933.153.796.675.234.790.235.519.467.434.328.547.611.767.013.440.031.554.432.534.844.647.298.756.881.984.813.696.106.276.099.041.644.436.865.326.704.962.005.414.703.252.661.697.429.052.228.700.026.065.934.215.598.541.335.206.314.601.174.756.857.372.108.267.519.395.603.749.844.795.252.189.671.825.103.542.031.215.733.628.895.819.541.342.350.496.767.544.577.359.612.671.868.612.857.438.207.662.577.444.439.948.508.920.511.081.719.932.202.807.952.094.944.050.633.931.520.353.705.165.752.224.278.973.066.052.968.454.719.257.620.483.060.470.600.788.353.841.819.233.018.709.738.129.272.890.069.127.555.164.502.616.928.102.212.343.992.914.591.955.318.844.285.013.299.957.618.895.751.836.410.624.400.229.016.257.087.124.946.066.477.575.152.076.724.047.120.392.797.560.167.658.863.103.308.402.495.871.217.091.072.663.815.427.719.636.357.536.979.632.444.694.514.337.858.315.807.830.123.045.624.488.992.063.343.898.622.232.809.815.276.499.488.686.478.228.480.874.239.466.465.854.539.844.009.846.101.554.232.183.838.534.179.468.661.774.189.936.357.207.632.600.958.655.709.417.275.749.429.239.988.171.339.658.743.365.174.488.065.007.582.726.285.863.146.448.924.868.664.427.085.110.604.128.660.321.340.974.290.227.751.774.596.026.947.684.109.219.687.306.112.339.935.786.833.700.659.979.398.202.936.706.616.097.546.152.220.112.351.577.429.071.691.996.714.225.148.201.836.224.531.388.188.828.414.881.188.334.920.655.630.153.169.251.145.055.210.281.181.391.953.380.107.481.654.255.645.127.994.887.231.589.208.565.664.071.302.800.977.912.220.698.957.776.480.636.745.408.839.203.784.677.444.818.657.023.410.443.268.816.498.801.371.347.267.132.397.716.732.400.934.315.263.934.769.040.513.464.841.561.083.944.551.934.883.988.744.727.388.060.728.901.992.257.005.859.055.592.579.702.701.498.789.876.629.246.140.468.987.055.648.848.202.353.823.182.795.242.782.132.450.518.480.143.325.145.961.034.852.129.829.326.886.460.411.094.976.924.341.652.757.372.601.080.646.845.728.370.074.061.158.221.585.322.990.526.186.875.844.634.722.511.809.085.241.823.052.372.900.726.216.206.528.436.967.345.658.215.327.215.577.167.284.155.988.406.956.370.554.636.684.846.128.334.980.163.194.517.674.669.364.279.385.002.588.645.091.883.068.843.227.246.373.030.571.025.707.218.598.274.899.936.665.115.662.266.698.431.953.945.913.395.325.132.968.342.194.668.498.035.884.320.932.911.784.631.818.654.384.169.888.679.752.612.611.749.789.608.674.697.848.597.112.146.170.633.493.014.995.995.939.377.711.625.582.930.808.676.496.829.249.602.222.619.292.424.252.447.656.287.929.667.304.629.730.313.799.833.027.997.407.244.725.276.302.509.781.047.384.314.176.384.823.474.910.492.580.222.090.290.554.667.340.599.932.753.957.196.728.351.641.530.502.477.184.104.421.940.129.501.065.236.407.261.763.483.076.234.063.819.323.295.322.334.572.201.851.271.712.048.346.025.161.475.245.874.116.634.416.313.368.359.316.761.604.178.485.441.489.158.625.560.121.491.042.371.977.306.153.220.569.706.918.328.875.307.971.430.260.713.887.737.488.956.424.580.200.236.408.778.520.928.365.218.519.552.706.035.683.158.762.854.973.241.589.167.003.513.281.971.327.092.826.499.224.800.043.686.420.871.287.431.718.214.941.144.530.960.087.739.504.822.344.102.520.782.962.035.655.516.108.733.270.659.431.057.180.908.984.684.448.928.694.705.124.124.751.606.008.094.399.621.875.077.691.874.521.915.181.113.806.039.218.189.833.084.405.981.006.235.900.180.458.129.988.105.338.583.529.802.090.663.515.116.386.820.510.979.864.565.900.767.992.236.804.789.116.660.274.242.074.465.689.915.450.163.766.609.593.644.411.213.658.850.426.576.985.714.383.529.945.401.624.240.851.788.213.136.506.239.696.917.002.589.171.303.083.395.774.381.051.715.446.123.416.942.925.788.932.355.391.606.449.483.696.380.865.380.479.401.225.761.887.270.569.344.417.173.464.066.734.925.686.822.031.186.619.591.207.908.188.163.543.880.284.239.713.582.360.127.100.766.740.462.781.576.536.412.091.547.295.248.764.840.471.666.066.886.272.811.794.388.843.307.743.219.581.147.645.698.680.387.569.504.738.045.883.982.131.896.112.230.345.059.280.509.514.222.564.943.979.549.630.201.014.429.406.711.932.844.557.572.047.355.690.339.872.179.753.848.274.878.798.152.859.000.846.882.877.414.009.866.914.761.358.366.440.377.801.312.479.831.726.979.172.606.302.076.253.499.666.244.092.966.565.390.532.288.641.408.697.346.023.687.547.506.031.740.987.393.609.838.537.001.985.848.652.074.791.142.773.969.558.686.068.103.239.608.277.471.576.212.743.198.754.648.861.093.060.447.353.376.563.809.288.613.931.608.800.053.166.651.703.663.865.969.292.530.081.789.003.659.484.129.664.968.142.179.801.303.112.232.192.669.674.091.013.079.467.578.825.009.159.044.999.079.560.119.842.841.840.774.891.322.796.637.499.760.228.395.422.678.882.059.279.834.646.872.879.981.930.583.515.287.830.368.264.532.692.919.057.271.956.752.859.681.898.881.886.439.498.541.387.316.275.493.536.339.245.860.145.603.417.865.564.038.277.467.084.924.043.844.300.194.133.440.861.596.940.217.360.333.529.432.648.799.262.398.491.748.653.232.046.843.518.635.512.424.815.632.399.790.091.319.383.058.951.187.011.114.233.453.689.320.405.036.906.291.814.530.819.976.733.957.592.968.524.495.140.582.759.514.448.923.159.004.961.394.589.314.771.337.923.396.087.724.405.318.646.867.730.296.686.622.216.582.280.224.704.535.802.675.951.705.297.733.101.574.404.733.234.294.106.977.662.349.780.130.398.107.238.471.389.861.024.459.294.575.811.352.809.667.773.935.782.519.357.691.654.885.762.027.480.876.727.340.785.581.940.695.206.967.048.771.578.908.351.334.402.574.318.360.856.798.632.193.726.331.881.046.550.283.723.720.625.207.213.836.985.110.344.362.774.623.912.526.688.659.983.654.267.354.503.660.130.184.607.261.315.347.892.500.198.158.534.311.653.143.488.751.073.335.663.986.008.699.935.524.190.905.789.217.129.357.586.101.554.142.732.918.813.816.072.527.413.704.725.464.366.051.646.675.037.391.784.977.872.153.248.236.462.016.877.698.741.132.976.640.021.269.842.951.404.381.527.581.056.902.776.015.531.253.481.931.405.030.436.144.936.581.763.280.511.888.899.369.043.601.567.238.284.442.140.156.326.757.855.473.238.089.749.069.339.318.565.134.994.017.937.497.714.189.140.450.618.133.800.653.710.578.905.701.193.311.969.411.347.862.991.637.492.457.299.585.035.908.754.211.636.702.432.567.221.176.079.660.768.846.353.555.462.499.893.863.101.174.653.198.802.832.831.885.178.638.820.410.982.868.270.150.458.595.564.192.731.489.094.513.832.587.837.778.402.634.039.494.533.848.163.122.481.509.741.915.459.173.112.340.528.351.759.643.471.126.024.503.393.330.158.870.272.334.363.416.442.648.181.643.133.908.264.254.933.923.111.022.423.455.394.119.289.728.706.968.646.229.942.361.232.659.681.244.229.928.952.837.713.086.869.367.074.666.949.688.235.664.289.445.365.668.999.643.590.811.391.326.976.398.846.698.039.163.994.331.116.507.859.109.105.924.722.221.613.792.406.097.180.860.730.268.431.660.514.233.902.099.427.754.888.095.099.364.499.218.182.387.485.465.844.285.051.917.314.623.301.785.886.569.239.355.767.307.416.457.189.612.282.758.860.678.096.482.576.322.259.178.855.099.811.889.366.588.598.608.684.908.532.188.707.142.217.344.059.879.583.601.545.364.239.908.382.288.075.627.566.254.672.929.090.798.418.902.495.018.625.839.477.832.341.704.525.609.735.226.696.945.209.111.895.724.091.069.262.734.097.346.060.834.140.884.114.546.272.034.601.091.075.066.607.392.927.461.031.018.901.624.959.936.692.727.437.189.452.777.837.271.013.910.330.347.961.872.563.618.384.006.929.406.625.687.660.521.937.920.414.284.075.876.948.973.734.864.464.296.607.958.874.410.374.897.971.401.665.086.279.019.680.361.306.483.792.807.440.323.167.915.458.631.773.816.291.915.663.534.193.112.382.112.071.813.202.257.524.360.679.505.100.218.981.464.929.190.236.763.783.884.289.630.547.657.712.303.511.263.652.170.376.929.554.242.114.844.147.849.278.758.761.487.178.844.511.090.491.684.931.381.508.701.140.795.470.331.425.832.791.795.174.443.345.316.014.017.867.100.467.026.206.758.767.175.293.541.541.367.448.607.018.457.158.925.166.198.803.970.569.883.690.691.795.536.265.756.734.804.837.307.306.460.085.877.107.425.844.666.829.497.295.996.390.238.859.916.362.686.269.934.097.408.562.451.476.379.374.623.550.993.196.136.489.109.563.409.955.438.781.736.113.227.277.878.640.026.582.173.112.714.168.162.050.899.915.521.069.574.813.178.029.882.221.126.053.148.427.407.720.991.984.830.626.114.877.600.943.804.760.919.335.465.806.661.429.107.592.246.850.925.071.517.243.057.081.631.970.863.369.812.005.306.255.905.999.324.382.233.029.502.936.002.282.526.268.740.998.131.292.768.010.353.478.173.880.395.182.261.541.688.558.324.154.255.710.642.637.455.629.200.928.787.273.308.760.210.116.255.276.495.673.080.841.991.400.328.385.261.222.969.550.178.143.630.017.875.486.337.732.118.150.638.322.293.756.098.013.850.524.029.030.664.114.310.341.122.938.217.398.771.306.332.750.102.479.108.831.754.172.349.785.706.349.369.713.029.847.582.738.408.479.430.086.494.764.310.052.593.231.793.690.681.239.110.605.647.357.577.679.219.408.310.561.633.174.516.714.747.601.898.382.892.095.187.207.020.126.861.359.405.365.855.555.035.562.518.384.115.581.027.783.943.449.647.987.123.407.525.608.545.296.453.688.019.745.127.827.411.102.214.473.156.039.551.453.335.455.244.708.166.671.265.000.212.295.201.818.311.964.955.103.092.429.040.511.927.071.866.044.172.960.532.548.207.694.166.108.603.948.611.303.372.962.622.557.823.024.934.543.091.179.436.720.707.073.316.494.701.505.742.233.785.036.393.036.073.152.177.532.933.209.298.374.067.640.072.924.123.428.173.163.231.774.658.502.585.499.405.723.437.552.139.274.519.521.359.490.480.070.875.385.415.499.347.603.123.034.066.820.963.985.109.151.431.832.906.539.974.201.459.967.477.329.530.271.979.033.949.223.392.967.770.231.845.496.483.389.366.966.248.571.993.802.453.741.505.022.035.119.302.556.932.520.161.050.759.990.024.756.053.201.742.583.772.117.730.383.507.254.036.440.389.185.326.790.029.881.442.398.893.769.828.331.810.782.958.805.218.089.704.173.610.162.555.575.007.708.667.458.544.934.890.512.622.299.694.475.604.979.866.102.964.462.896.587.325.781.669.251.722.000.730.931.283.523.623.354.406.568.630.730.994.343.003.934.210.320.011.286.688.678.648.168.322.825.413.855.565.898.791.718.885.801.024.231.781.076.399.571.689.659.585.878.425.746.418.483.785.829.430.232.743.113.385.941.794.893.119.432.754.365.965.535.005.150.877.462.612.292.268.959.195.081.616.313.737.212.210.257.390.964.057.847.621.674.973.275.959.816.144.100.756.290.264.388.769.877.842.730.815.864.795.303.224.896.420.036.449.763.714.326.706.326.443.097.444.394.344.036.145.189.884.729.333.128.921.943.113.919.833.190.552.273.937.562.212.046.453.946.626.458.293.709.271.856.652.813.294.843.231.145.827.998.397.644.217.000.189.970.754.623.522.245.181.421.510.350.285.443.198.157.596.920.161.240.801.647.808.864.472.115.938.552.357.282.910.955.655.677.780.512.706.340.618.660.309.634.109.339.094.782.479.039.426.803.287.485.222.398.171.128.768.486.408.645.900.793.450.789.981.835.891.828.923.988.164.408.760.812.976.907.798.534.971.956.215.225.024.748.426.541.965.305.520.154.012.479.985.207.138.005.622.616.551.716.691.844.471.982.225.836.614.784.559.951.976.421.937.103.376.188.806.280.170.173.910.447.502.781.004.856.875.832.898.456.757.459.481.662.690.674.058.244.813.481.059.889.883.064.434.478.813.670.495.626.007.657.390.338.192.134.475.152.869.835.461.163.047.957.891.472.203.839.321.271.143.839.235.084.745.739.561.868.255.157.077.485.107.186.408.241.854.866.776.794.431.270.504.440.973.438.748.104.298.897.467.188.503.966.985.480.451.422.038.096.093.147.409.580.786.311.434.826.195.890.571.556.349.418.313.604.686.478.628.594.788.476.583.562.882.659.779.383.273.303.181.027.125.928.699.434.203.590.177.926.447.948.905.643.895.047.005.444.140.014.297.532.391.746.027.868.350.952.278.694.063.296.514.551.475.216.771.688.077.309.059.538.777.369.727.068.976.051.903.334.842.321.203.023.886.726.887.610.742.867.344.151.477.077.447.947.091.230.069.759.394.698.408.052.691.949.701.481.606.834.317.937.400.459.134.828.214.517.810.425.950.478.708.392.815.891.499.143.524.321.284.303.438.977.601.721.899.395.142.664.393.266.159.175.684.533.903.096.222.696.225.748.357.123.832.221.891.972.234.299.715.730.828.939.907.870.248.387.493.564.083.113.874.076.687.095.177.462.972.177.492.847.323.467.447.136.083.738.265.422.579.329.651.097.695.663.833.855.348.851.383.647.758.945.146.843.037.345.108.609.270.960.515.186.398.037.429.275.504.965.306.477.071.017.590.076.927.883.283.074.090.470.901.796.452.204.560.875.976.865.956.689.184.176.860.668.548.917.754.524.508.818.761.707.210.379.104.180.886.063.213.729.857.965.583.854.858.417.825.811.083.080.939.815.782.535.892.387.544.338.903.435.770.554.224.322.066.509.656.982.458.223.716.772.061.041.485.951.452.839.810.214.370.828.308.090.078.602.611.958.425.537.714.463.101.947.342.653.097.245.181.455.882.570.795.833.278.264.199.233.292.781.779.691.739.834.722.374.028.359.134.968.926.534.812.645.673.867.047.155.383.209.962.329.386.609.251.989.545.980.416.923.793.235.473.960.577.074.906.465.579.758.020.885.996.768.737.823.912.925.737.867.690.625.424.878.601.078.384.977.143.051.470.735.547.303.126.810.103.256.798.149.154.184.244.813.086.438.826.287.234.916.227.194.779.836.256.231.630.294.462.873.416.143.763.861.548.956.211.326.909.332.740.978.844.539.941.620.533.854.888.022.121.390.787.653.940.979.210.615.900.695.695.764.962.648.335.246.911.960.931.320.020.678.311.139.351.131.272.581.457.044.019.187.773.344.254.136.895.497.827.988.479.497.176.282.435.453.896.259.148.293.007.225.796.075.303.715.612.165.944.846.312.972.217.359.772.965.858.764.062.994.697.240.404.871.943.464.498.250.604.056.850.829.531.560.557.257.824.605.806.436.714.797.704.816.568.945.727.201.160.375.604.927.369.622.790.291.111.707.986.018.783.025.665.906.550.823.741.832.569.198.927.369.151.219.632.599.413.828.382.415.366.689.282.189.697.323.514.468.626.981.132.959.905.314.685.412.467.648.583.769.203.539.414.754.453.342.161.191.547.645.317.765.111.184.895.289.431.714.920.304.803.484.306.639.280.461.153.969.523.848.127.631.060.898.972.208.371.169.679.380.335.202.777.582.736.867.187.740.067.626.815.192.984.409.367.585.824.318.026.792.982.519.579.318.360.255.270.845.064.955.768.645.431.994.778.642.443.792.500.294.845.225.083.537.757.679.281.446.392.584.469.313.692.051.537.916.772.128.641.463.891.956.797.736.102.147.085.825.189.667.655.779.766.394.920.383.481.619.482.742.073.047.689.553.616.486.894.013.078.277.039.223.735.325.766.829.610.778.652.051.470.246.079.013.047.672.461.796.271.239.302.204.223.059.977.187.565.678.317.170.733.262.899.677.810.764.312.110.531.124.810.452.500.644.781.600.520.172.395.831.180.475.539.708.973.496.542.514.609.423.868.675.992.196.832.190.062.051.545.143.386.251.281.752.343.081.379.118.533.529.158.916.074.539.366.429.419.016.681.596.266.666.225.331.730.196.737.836.402.071.811.897.039.374.203.856.624.311.391.856.767.958.698.604.244.547.893.812.503.138.296.294.282.338.344.421.796.461.933.954.890.700.603.371.917.295.457.457.346.035.877.396.591.223.216.373.244.876.540.343.685.185.817.416.059.214.876.045.145.731.912.363.065.794.765.939.457.631.490.868.433.477.763.269.778.396.688.087.622.275.354.324.587.383.585.135.583.811.179.779.696.138.131.065.741.268.187.633.661.846.217.960.666.504.051.491.734.166.083.289.503.200.089.684.888.469.945.173.984.663.864.141.251.614.988.885.824.991.896.947.764.227.301.243.574.760.716.026.262.825.440.105.254.061.845.313.203.976.872.710.916.561.983.858.623.839.321.211.370.538.795.959.311.484.633.533.410.757.236.125.173.045.317.604.937.591.964.576.143.011.142.311.710.546.822.929.656.556.274.389.533.450.585.214.874.767.913.431.975.133.404.476.270.991.029.186.980.373.033.510.505.729.799.453.571.486.584.382.680.717.008.453.854.614.190.601.560.079.734.820.396.503.562.780.145.644.641.793.344.786.776.264.090.925.341.598.803.663.987.369.828.686.918.476.597.024.004.363.917.575.611.701.351.494.238.612.345.987.695.969.135.670.084.488.463.775.937.549.671.495.248.925.556.262.345.704.683.112.312.897.390.539.055.000.273.159.179.356.312.995.162.507.083.932.599.752.512.000.096.042.317.085.907.313.965.833.530.141.855.820.396.530.035.887.539.907.509.666.531.737.785.790.793.686.547.432.335.001.846.734.430.725.426.503.437.900.089.203.841.039.783.220.320.901.491.501.363.111.848.304.394.525.993.272.847.286.869.337.035.384.268.226.490.542.032.245.053.355.512.757.371.604.104.366.679.991.254.532.408.481.676.328.824.199.661.555.831.487.315.299.440.455.200.755.195.924.979.020.673.221.185.481.187.723.139.093.505.770.973.022.046.731.185.077.526.590.557.303.650.305.017.073.155.925.668.965.114.619.849.721.744.711.898.073.309.259.112.577.991.141.878.228.927.357.133.545.904.437.200.653.410.038.901.886.619.155.496.796.890.600.015.358.350.564.377.306.437.667.080.712.131.074.071.897.975.792.078.704.659.192.099.202.886.617.529.142.744.259.976.002.745.114.944.115.687.631.576.555.701.844.051.618.890.297.539.136.824.790.428.784.770.288.217.841.779.177.443.997.621.085.770.842.147.191.051.425.869.093.695.990.650.335.045.183.838.101.251.202.894.636.753.940.212.317.629.606.661.258.911.583.857.155.971.640.983.567.848.908.252.516.490.780.540.660.755.238.073.696.653.216.426.075.228.514.764.181.622.690.052.989.171.075.106.059.816.080.047.526.626.564.900.332.055.535.447.924.944.814.866.333.727.244.326.232.109.187.342.426.748.916.539.916.591.806.698.925.472.241.557.864.022.241.862.356.398.980.126.863.525.828.807.204.615.380.427.539.044.655.134.131.483.639.239.735.828.811.218.838.563.706.385.948.357.145.767.921.426.892.327.550.514.638.724.484.008.309.998.851.137.060.214.056.318.989.386.583.879.784.589.759.805.433.237.460.236.339.899.353.051.565.787.600.499.161.630.695.070.604.394.417.083.243.640.749.517.013.361.513.851.197.460.357.175.281.611.642.807.018.877.903.751.939.655.985.156.940.915.499.310.263.791.413.154.309.977.009.464.135.274.702.293.748.829.118.155.531.557.181.739.127.795.926.242.631.756.913.142.599.663.101.956.908.318.328.292.190.074.610.779.433.411.832.513.448.935.793.980.813.778.947.006.581.596.746.335.751.320.674.310.414.213.654.734.307.463.102.259.090.515.772.809.900.178.202.293.551.182.745.382.308.946.156.170.413.620.428.676.145.783.719.580.509.214.633.633.773.750.096.795.753.813.116.987.116.005.354.352.612.732.373.236.626.036.387.660.496.383.495.168.562.349.133.940.533.740.741.192.663.615.243.096.204.825.941.874.333.714.507.605.575.296.202.287.057.227.462.366.560.472.692.245.107.814.321.937.190.824.600.037.705.329.679.994.478.185.669.000.629.853.100.735.415.196.739.227.695.118.985.644.740.290.313.341.054.075.376.979.738.143.377.546.683.446.368.169.592.761.428.670.679.337.329.510.557.190.740.134.944.635.299.856.444.369.377.716.182.580.236.214.476.547.158.485.702.419.213.145.533.906.722.525.595.024.640.729.501.489.859.844.221.676.017.082.311.816.893.598.620.444.253.188.289.450.656.361.699.955.249.701.613.520.144.971.120.860.057.634.099.545.596.896.243.876.197.513.438.770.449.219.074.789.649.588.025.763.537.988.052.779.366.440.374.178.682.735.443.100.018.487.798.817.982.828.460.804.370.177.956.457.086.054.359.573.266.195.165.984.303.983.185.794.892.148.589.642.707.220.405.257.064.786.902.534.237.993.348.583.466.218.283.961.570.922.302.835.371.519.646.243.378.481.824.150.333.989.508.781.858.209.934.782.211.109.168.837.970.111.754.302.888.479.034.853.786.066.754.034.872.614.797.897.417.714.017.761.571.495.173.799.485.872.493.233.908.514.102.193.388.960.349.301.040.199.663.279.208.504.791.908.851.384.987.130.863.807.661.671.083.892.750.887.981.891.804.385.535.775.024.152.904.836.574.967.632.556.580.605.830.575.336.483.373.629.916.244.999.436.782.911.733.680.938.241.640.243.718.045.188.558.434.713.909.602.122.885.996.987.413.055.187.699.477.670.401.285.200.635.005.297.933.166.543.804.243.941.811.520.897.406.456.555.671.553.906.317.079.364.240.569.092.361.611.460.583.877.866.344.170.851.050.479.457.056.645.997.946.540.340.933.372.953.417.683.946.183.818.998.957.603.604.662.257.045.753.272.478.617.177.260.320.861.164.617.199.606.000.192.732.863.382.632.230.347.177.583.578.346.002.806.688.531.129.525.672.312.951.145.706.710.571.382.642.007.802.493.815.046.102.141.886.495.134.049.700.210.471.212.466.253.837.263.979.824.943.109.797.408.764.996.213.615.841.170.809.784.664.431.454.456.236.333.460.739.760.537.690.673.842.072.715.317.146.632.371.171.191.426.423.263.218.925.774.009.395.614.935.183.684.372.255.348.263.997.102.790.354.229.532.547.582.596.452.214.418.260.347.462.674.033.335.506.047.779.204.957.488.679.646.178.192.020.505.885.453.264.656.505.989.422.597.218.818.132.429.643.574.093.300.620.481.272.686.910.172.049.484.144.474.179.041.092.507.595.349.391.258.872.431.019.456.078.002.253.658.893.393.640.333.882.484.984.229.868.475.970.263.401.424.265.310.638.927.938.451.001.980.275.684.733.455.951.632.364.983.875.161.093.844.705.210.843.950.782.253.009.205.188.315.604.786.828.687.748.357.082.579.272.761.160.909.618.907.213.043.916.216.264.006.733.679.415.933.315.618.959.289.893.754.507.747.555.763.722.804.491.520.766.294.096.252.007.859.169.856.285.857.994.975.533.718.780.855.310.102.262.905.786.160.277.537.358.943.788.037.157.838.469.916.495.505.965.419.477.644.849.003.932.617.058.130.946.047.080.518.760.484.057.979.484.878.832.947.748.554.401.329.383.450.988.232.757.937.745.082.041.870.066.296.466.020.352.219.875.584.652.305.988.059.616.934.838.276.428.669.736.437.836.145.049.536.277.469.540.036.525.674.735.273.203.402.185.424.513.270.037.378.238.322.019.101.481.465.847.004.964.104.907.656.678.255.609.344.451.058.713.859.664.334.598.382.082.958.680.289.259.084.833.277.248.681.968.210.543.050.904.526.543.141.876.148.389.816.922.694.902.561.185.370.642.559.432.115.571.763.338.132.622.029.260.004.069.227.916.912.182.162.776.305.322.267.811.467.376.951.433.977.948.605.575.747.916.999.941.167.744.610.814.802.177.107.423.297.827.096.855.722.623.637.872.871.083.388.653.735.418.199.749.010.786.851.584.756.288.242.166.775.014.135.656.672.993.631.550.983.642.922.520.796.627.560.493.533.727.173.072.689.356.433.238.402.437.006.527.219.978.796.996.002.181.558.525.806.073.040.736.260.502.061.926.074.211.943.393.366.716.944.219.354.629.154.914.624.677.570.894.509.337.572.088.091.637.295.848.990.602.232.742.318.934.042.313.435.513.865.249.409.291.071.183.469.558.644.368.729.510.833.599.955.397.747.806.365.099.354.360.315.958.998.229.406.955.879.861.625.894.256.504.084.178.860.128.656.643.344.973.115.402.009.888.312.994.718.481.006.923.993.863.129.471.683.998.444.099.962.215.888.479.447.936.356.432.356.476.556.475.744.125.346.939.629.206.132.541.096.820.102.119.056.671.474.352.162.955.914.199.058.543.609.764.653.191.671.311.558.192.282.282.268.792.702.864.598.461.048.474.322.992.203.992.886.913.430.196.736.852.271.146.725.149.404.004.966.862.932.655.451.940.282.305.506.435.681.226.618.909.141.651.613.499.280.269.241.679.778.685.388.182.895.195.541.447.043.749.494.947.258.645.732.223.386.597.693.992.504.254.941.218.754.312.371.869.509.518.094.735.373.342.617.599.067.349.549.920.424.947.018.495.166.670.141.550.810.907.685.161.670.747.926.300.720.873.819.047.452.293.292.555.568.230.194.894.495.909.360.541.983.932.094.011.950.924.720.573.878.410.607.636.077.650.823.437.197.713.766.114.234.397.518.388.158.917.884.965.996.724.465.553.632.868.124.522.138.127.090.957.097.438.245.699.550.371.080.063.610.811.883.149.356.770.651.939.170.478.580.009.723.634.750.234.525.230.586.956.973.442.183.601.226.892.857.659.834.571.952.751.402.432.535.974.019.285.723.440.143.178.663.085.661.489.468.395.949.655.292.876.968.954.134.375.894.636.957.215.897.554.269.577.972.545.320.348.925.621.001.018.181.082.629.574.065.977.234.465.759.785.287.286.714.374.727.495.872.678.587.414.207.848.650.895.584.387.998.034.625.046.290.171.801.359.865.921.283.084.324.110.095.123.551.304.987.840.882.204.969.719.686.525.690.716.473.952.684.208.210.845.147.877.429.937.413.685.366.415.637.969.929.823.142.715.151.041.472.330.784.946.315.404.898.554.846.796.151.186.570.216.730.649.318.271.975.902.921.153.186.943.175.465.573.593.065.494.635.152.916.844.790.790.458.553.125.497.137.928.673.185.492.642.988.151.351.749.980.555.583.187.839.911.332.022.938.629.411.423.988.267.600.356.654.324.597.873.469.188.507.881.263.522.836.236.015.950.934.069.352.503.689.517.674.756.165.797.438.330.478.239.020.989.779.629.152.824.515.863.111.964.725.097.784.160.096.873.654.887.523.657.692.708.858.660.924.426.466.417.528.459.411.917.468.227.811.968.564.928.339.695.607.991.760.110.838.526.779.605.813.635.674.564.126.462.387.477.076.176.576.076.716.003.437.705.784.461.587.463.694.687.070.089.585.277.095.337.783.919.922.252.384.173.340.676.544.035.949.056.908.588.828.631.439.042.502.771.447.563.752.818.777.651.253.709.918.812.401.251.883.652.056.354.669.580.952.905.741.415.582.490.443.391.738.002.852.555.008.209.191.847.851.592.479.073.851.265.036.140.857.181.722.009.424.954.159.765.991.869.004.628.183.191.226.610.222.509.780.122.728.274.269.964.956.780.472.796.359.983.193.929.814.543.003.579.665.146.025.703.293.835.876.866.905.044.338.119.473.208.110.838.209.412.870.734.152.425.755.882.705.748.159.165.813.050.178.593.910.256.124.229.010.094.260.825.631.140.463.614.889.387.270.678.084.104.253.868.290.265.833.469.364.298.217.996.716.250.516.848.078.271.855.654.652.623.275.174.807.662.421.334.592.866.518.168.777.832.485.204.717.098.600.835.198.134.559.305.012.490.290.130.422.241.338.403.958.285.184.764.190.905.482.027.517.918.757.579.601.123.830.535.605.112.231.393.403.019.756.477.049.965.699.422.050.882.994.827.980.801.851.757.670.345.169.938.937.847.080.418.089.479.760.574.687.266.210.178.988.958.322.126.026.823.402.114.183.928.602.117.706.731.368.865.987.014.370.986.558.619.181.732.240.685.276.658.039.038.354.363.467.907.704.417.875.928.816.855.390.161.550.018.749.180.460.876.687.660.973.851.061.782.922.830.563.715.645.476.215.243.824.913.175.287.139.102.074.142.077.600.793.968.658.444.817.412.235.270.713.000.205.186.815.788.646.373.003.178.174.407.991.557.273.349.069.111.092.288.299.273.620.724.666.915.851.335.545.120.747.688.390.605.016.278.790.626
Este es un número con 20.899 dígitos, muy superior en tamaño, si lo comparamos con un Gúgol.
El código fuente es:
Etiquetas:
eclipse,
fibonacci,
java se,
java.math.bigdecimal,
jdk
Ubicación:
Manizales, Caldas, Colombia
Suscribirse a:
Comentarios de la entrada (Atom)
No hay comentarios.:
Publicar un comentario