Cody

A C

131
Rank
21
Badges
6732
Score
1 – 50 of 679

A C submitted a Comment to Problem 42935. Sums of cubes and squares of sums

Can someone point me in the right direction? n = 1e5; y_correct = uint64(500010000050000); I get 500010000050005. I do not know how to go beyond double precision. function y = cubesLessSquare(n) % Formula N = (((sum((1:n).^3)*2 - sum(1:n)^2)*2/n)) % double to char C = sprintf('%f',N) % char to vector Y = C - '0' % take out the dot and the numbers after the dot Dot = find(Y<0) Y([Dot:end]) = [] % join the the numbers Z = sprintf('%d',Y) % make to double y = str2num(Z) end

on 16 Jan 2021 at 19:19

A C submitted Solution 4578828 to Problem 1253. Infinite precision division

on 11 Jan 2021 at 22:17

A C submitted Solution 4572593 to Problem 553. How to multiply?

on 11 Jan 2021 at 1:40

A C submitted Solution 4572083 to Problem 563. How to add?

on 10 Jan 2021 at 21:31

A C submitted a Comment to Problem 44309. Pi Digit Probability

% I used Machin's Formula: pi = 4[4arctan(1/5) - arctan(1/239)] because it was used for speed. But it will not go no more than 16 digits. How can I go beyond 16 digits? function [PI] = pidigit(N,n) A = 0; F = 10^300; % Machin's Formula: pi = 4[4arctan(1/5) - arctan(1/239)] x1 = 1/5; x2 = 1/239; for K = 0:1000000000 A1 = 4*((-1)^K*x1^(2*K+1)/(2*K+1)); A2 = (-1)^K*x2^(2*K+1)/(2*K+1); A = A + 4*(A1 - A2)*F; end E = abs(pi*F-A)/(pi*F); PI = sprintf('%.f',A) -'0'; sum(PI(1:N-1) == n) sum(PI(1:N-1) == n)/(N-1) end

on 10 Jan 2021 at 2:32

A C received Community Group Solver badge for Answer is Art!

on 8 Jan 2021 at 17:49

A C submitted Solution 4562043 to Problem 44652. Draw a 'X'!

on 8 Jan 2021 at 17:49

A C submitted Solution 4561923 to Problem 44679. Draw 'E'

on 8 Jan 2021 at 17:32

A C submitted Solution 4561873 to Problem 44686. Draw 'J'

on 8 Jan 2021 at 17:27

A C submitted Solution 4561808 to Problem 44672. Draw 'C'.

on 8 Jan 2021 at 17:19

A C submitted Solution 4561743 to Problem 44681. Draw 'H'

on 8 Jan 2021 at 17:11

A C submitted Solution 4561088 to Problem 44656. Draw a 'N'!

on 8 Jan 2021 at 15:41

A C submitted Solution 4557978 to Problem 44685. Draw 'B'

on 8 Jan 2021 at 4:46

A C submitted Solution 4557858 to Problem 1630. ~~~~~~~ WAVE ~~~~~~~~~

on 8 Jan 2021 at 4:06

A C submitted Solution 4551463 to Problem 42737. Spherical Volume

on 7 Jan 2021 at 2:25

A C submitted Solution 4551413 to Problem 2908. Approximation of Pi

on 7 Jan 2021 at 2:10

A C submitted Solution 4550643 to Problem 44060. Volume Pillar

on 6 Jan 2021 at 21:51

A C received Community Group Solver badge for Basics on Cell Arrays

on 6 Jan 2021 at 21:24

A C submitted a Comment to Problem 340. Find last non-zero in a given dimension

What is the 3 and 4 dimension in matrix? How is it used?

on 6 Jan 2021 at 14:42

A C submitted Solution 4545813 to Problem 2551. Rounding

on 6 Jan 2021 at 2:19

A C submitted Solution 4538493 to Problem 676. Reindex a vector

on 4 Jan 2021 at 18:04

A C submitted Solution 4538123 to Problem 42348. Square a Number

on 4 Jan 2021 at 16:52

A C submitted Solution 4538113 to Problem 1796. 02 - Vector Variables 5

on 4 Jan 2021 at 16:50

A C submitted a Comment to Solution 4532748

when the code is rewritten as y = [y {s(S:Ind(E))}];, it includes the spaces. But, when the code is rewritten y =[y cellstr(s(S:Ind(E)))] it leaves the spaces out. Why does it do that?

on 3 Jan 2021 at 16:26

A C submitted Solution 4530838 to Problem 1380. Celsius to Kelvin

on 3 Jan 2021 at 4:47

A C submitted Solution 4530828 to Problem 84. Longest Divisor Run

on 3 Jan 2021 at 4:45

A C submitted Solution 4530628 to Problem 90. Connect Four Win Checker

on 3 Jan 2021 at 3:22

A C submitted Solution 4529723 to Problem 2983. Multiply by 3

on 2 Jan 2021 at 23:44

A C submitted Solution 4529553 to Problem 381. Angle between two vectors

on 2 Jan 2021 at 22:38

1 – 50 of 679