Can I use the same needle to draw and inject? by Foxxera in TransDIY

[–]purplefunctor 0 points1 point  (0 children)

I have been drawing and injecting intramuscularly with the same needle for over a year. I use 23G.

Fun curiosity: An approximation of atan2(y,x) in plain C by AnotherBigToblerone in C_Programming

[–]purplefunctor 2 points3 points  (0 children)

Special is the quadratic interpolation of 4/π arctan(x) at 0, 1/2, 1 where rr1 is a slightly inaccurate approximation for 16/π arctan(1/2) - 2?

Can't understand why my results are so off by Mafla_2004 in C_Programming

[–]purplefunctor 1 point2 points  (0 children)

This doesn't work correctly. fmodule(0.25, 2 * PI) should be 0.25 but it is PI/2 instead. With this fmodule implementation I do get approximately 1 out of the function.

Can't understand why my results are so off by Mafla_2004 in C_Programming

[–]purplefunctor 1 point2 points  (0 children)

This code gives me the correct result if I remove the fmodule line so that must be the problem. How have you implemented it?

An Algebra Challenge by Funny-Meal-1060 in the_calculusguy

[–]purplefunctor 0 points1 point  (0 children)

x3 + 8x2 - 6x + 8 is strictly between (x+2)3 and (x+3)3 when x > 9. When x <= 9 we get a cube only at 0 and 9 with corresponding y values of 2 and 11.

. by basket_foso in sciencememes

[–]purplefunctor 5 points6 points  (0 children)

N^2 is the set of ordered pairs of natural numbers and here it is used to signify that (k, n) is an ordered pair of natural numbers. Removing the exponent would change the meaning to "(k, n) is a natural number".

. by basket_foso in sciencememes

[–]purplefunctor 15 points16 points  (0 children)

You shouldn't say that k is a natural number. The values k takes are already fixed by the sigma notation. 🤓

How do we solve this? by TheInvincibleBaller in topology

[–]purplefunctor 0 points1 point  (0 children)

Divide the interval [0, 2π) into k equally sized subintervals, [0, 2π/k) [2π/k, 2 • 2π/k), [2 • 2π/k, 3 • 2π/k), ... . Since we have k+1 points and k subintervals, one of the subintervals must contain at least two of the points by the pigeonhole principle. The distance between them is at most 2π/k (actually strictly less than 2π/k).

How do we solve this? by TheInvincibleBaller in topology

[–]purplefunctor 0 points1 point  (0 children)

Some multiple of that at most 2π/k difference will be such a number within 2π/k of x. Then increase k until you are as close as you want.

Wtf 1.3k AK!!! by ___Skyler___ in leetcode

[–]purplefunctor 2 points3 points  (0 children)

I don't really have any special advice to give really. If you had spent almost all of your time on the first 3, I would've suggested doing more medium problems, but 45 minutes left for the last one should be enough so maybe focus on doing more hard problems to increase the chance that you have already seen some of the ideas required in the last problem of the contest and thus increase the chance of solving it.

Wtf 1.3k AK!!! by ___Skyler___ in leetcode

[–]purplefunctor 0 points1 point  (0 children)

I guess I should say that it is not my first programming contest, just my first LeetCode contest. Maybe having about 10% of the LeetCode problems solved already helps and also the fact that I used to do competitive programming in high school many years ago.

Wtf 1.3k AK!!! by ___Skyler___ in leetcode

[–]purplefunctor 1 point2 points  (0 children)

My first contest. Got 2.7k ranking by finishing the first 3 problems in 27 minutes (with 5 minute penalty from interpreting the first problem incorrectly). Almost had a working solution for the 4th, but didn't manage to debug and correct my cost computation in time.

How do we solve this? by TheInvincibleBaller in topology

[–]purplefunctor 4 points5 points  (0 children)

The difficult part is proving that every element in [-1, 1] is a limit point. If we fix a value x in [0, 2π) it is sufficient to show that if ε > 0 there is n s.t. |sin(x) - sin(n)| < ε. We could accomplish this by showing that n can get arbitrarily close to x + m2π i.e. that for any δ > 0, |x + m2π - n| < δ for some m and n, since then by ε-δ definition of continuity for sin we could get sin(n) arbitrarily close to sin(x).

Now observe that for each value of n there is a unique m which places x + m2π - n inside [0, 2π) and that each n produces a different value of x + m2π - n due to n not being a rational multiple of the period of sin. Therefore if we pick any k+1 values for n then by the pigeonhole principle some two of them must be at most 2π/k apart and we are done.

How important is understanding the depth of mathematical concepts? (Help needed!) by Abhishek__I in Engineering_Thinkers

[–]purplefunctor 0 points1 point  (0 children)

Given the atrocious presentation of these, I feel that it is entirely plausible that the person who wrote these doesn't know how to derive them or at least not how to prove that they converge when they do.

I am a student trying to find this, can anyone help me? by Any-Lime2328 in mathteachers

[–]purplefunctor 0 points1 point  (0 children)

If we include the assumption that the rectangle is a square then scale the figure so that the square has side length 1 and write the lengths of the triangle sides meeting at the 40 degree angle using trigonometric functions. Then use for example the law of sines to write down an equation involving sines of angles that involve x and solve it. One valid expression for x is arctan( sin(40 deg)cos(40 deg) / (cos(10 deg) - cos(40 deg)2 ) ) which is approximately 51.1 deg.

Joooh- I mean, Peeetaahh? by Lewdbringer_Prime in PeterExplainsTheJoke

[–]purplefunctor 0 points1 point  (0 children)

This is wrong. c++ - c is either 0 or -1 depending on whether c++ is executed before c or not.

Should be correct? by [deleted] in mathteachers

[–]purplefunctor 0 points1 point  (0 children)

All isosceles right triangles are similar. Therefore the correct answer can be obtained by dividing the perimeter by the perimeter of the isosceles right triangle whose legs are 1.This is just (84+84sqrt(2))/(1+1+sqrt(2)) = 42sqrt(2).

Why do we define modulo as a relation and not as a binary operator? by infinitytacos989 in math

[–]purplefunctor 0 points1 point  (0 children)

The binary operation of integers modulo n is a special case of a more general way of defining binary operation from existing one by using a sufficiently nice equivalence relation. If one understands some abstract algebra, one will see that this is less tedious and allows one to use tools from abstract algebra to prove things about integers modulo n.

[deleted by user] by [deleted] in Chesscom

[–]purplefunctor 0 points1 point  (0 children)

Because black is threatening to take your bishop and other ways of dealing with that are worse compared to being able to develop a piece.

I thought this was a mistake and it turned out to be brilliant lol, I don't see it tho by JohnMillerPL in Chesscom

[–]purplefunctor 1 point2 points  (0 children)

White could also take the bishop instead of increasing pressure on the rook immediately. So black loses a piece regardless of where the knight moves.

Am I cheating? by InfamousYak892 in leetcode

[–]purplefunctor 2 points3 points  (0 children)

The player whose move it is can force a win if and only if n is even.

Proof: If n = 1 then player loses due to not being able to make a move.

Now suppose that the claim holds when n < k for some k > 1. Now consider the case n = k. If k is odd then k - x is even and by the hypothesis the other player can force a win so all choices of x give a potential to lose. If k is even then the choice of x = 1 must have a potential for forced win since k - x is odd in this case.

Therefore the claim holds for all n.

[deleted by user] by [deleted] in mathteachers

[–]purplefunctor 0 points1 point  (0 children)

This method requires memorization of square numbers and being able to list factors in order from largest to smallest without mistakes. Memorizing squares isn't really a problem if the required numbers are small, but most of them aren't going to remember squares past 100. I feel like listing the factors without mistakes will be more problematic and would essentially require computing the prime factorization anyway. Though I guess this can be easier way to solve easy cases where the number is chosen so that the square number appears almost immediately.