Ranter
Join devRant
Do all the things like
++ or  rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power realtime personalized recommendations and activity feeds using a simple API
Learn More
Comments

wonwon02263yThe expression you want to "solve" is not an equation. I'd assume you mean:
(n/x)*(y/x) =0
I also assume you don't want the trivial answer:
y=0
======
Your problem seems a bit wierd. The second equation brings no usefull information as it can be reduced to:
x^2 = z.
and we already know x.
The first queation can be reduced to
n*y/x^2 = 0
since we know n and x, the only solution is y=0.
For this to be valid, x must not be equal to 0. 
@wonwon0
I just needed to confirm that my rudimentary math skills weren't leading me astray here.
The problem seems a bit weird because it's not a single value I'm looking for. I'm looking for all values that satisfy the problem.
@magicmirror, right you are. 
it's been a while and i am not a mathemagician but if i am doing it right z resolves to
z=((y/x)*x)*((x/y)*x)
z=(y)*(x^2/y)
z=x^2
so i don't see where it might be helpful in the formula knowing x already
(n/x)*(y/x) as @wonwon0 said equals
ny/x^2
doesn't this formula point to expected values? calling this e would resolve to
n*y/x^2=e
y=(e*x^2)/n
or did i misunderstood the question? 
turbod3353yIt's a joke? Because I don't get it.
If isn't:
First of all, all parenthesis are unnecessary.
Also if you simplify the second expresión, the Y's cancels out, so any value of Y that makes the equation have sense (all reals except 0) makes the expresión true. 
@erroronline1
"doesn't this formula point to expected values?'
yes. GG
@turbod
this is part of what I was looking for.
Hunches don't beat actually knowing math. The years of rampant alcoholism and exotic diseases from thai hookers have destroyed that part of brain. 
(x/n)*(y/n) = (x * y) / n**2
v = (x * y) / n**2
v * n**2 = x * y
(v * n**2) / x = y 
y cancels itself out so you can't get it. It's really just x**2. It's like solving (b  a) + (b + a). Y is inf to inf or better yet, y = y.

@erroronline1 It's either a mistake or deliberate trickery.
(n/x)*(y/x)
You know x, and you know n, and you know z where ((y/x)*x)*((x/y)*x) = z
What has the first equation for to do with the last? Where did n go?
((n/x)*x)*((x/y)*x) = z
y = v / (n * x**2) 
If you're really having problems working this stuff out for real this will save your life:
https://wolframalpha.com/input/...
https://wolframalpha.com/input/...
You can also always try with a for these things as well (IE google for online plotter). 

Quirinus7933yIf we're talking about real numbers here  the second equation is valid for any real y, except 0. This is only valid if x is not 0, and if z = x^2, otherwise, there's no solution.
So you can pick any value you want for y (not 0), and use it in the first expression to calculate how much it is.
This basically means that the value of the first expression can be anything you want (except 0, unless n =0). 
@Quirinus Some systems can "handle" division by zero.
I'd assume 0 * (n / 0) ends up back at zero. Not sure if invalid or weird. You go from y being useless and unknown to n being useless and unknown. This case is probably valid if n is 0?
Zero amounts of infinity is zero, IE, no infinity. 
SomeNone7633yIf I'm not very mistaken…
As already said, in the equation containing z, y cancels itself out, and the only constraint you get is that y != 0.
The other equation is (n / x)(y / x) = (ny) / x². With x² = z, we get (ny) / x² = (ny)/z => y = z / n. 
Quirinus7933y@RANTSMCPANTS Division by 0 cant be handled if we're talking about baisc math algebra.
n/0 is undefined. Doesnt matter what you multiply it with (even 0). Even if n = 0, you have 0/0 which is also undefined. 0*infinity is also undefined.
I didnt say that y is useless, on the contrary, I said it can be any number besides 0, if those other conditions are met.
‐
I guess i wasnt clear enough:
The first expression can be 0 only if n is 0. If n is not 0, the first expression can have any value, except 0. That is because y must not be 0, to avoid division by 0 in the 2nd equation, but can be any other number (as that satisfies the 2nd eq.).
This all hinges on the 2nd equation being solvable for y, which is only true for x not 0, y not 0, and z = x^2. It is then solved by any y that is a real number different from 0. 
Quirinus7933y@SomeNone you have constraints that x must not be 0, otherwise theres division by 0. You also have a constraint that y must not be 0, for the same reason.
Another constraint is z = x^2, which doesnt need to be true, as we already know the values for z and x. If they do not satisfy z = x^2, then the 2nd eq. is false, or the values for x and z are false, which means we cant find y.
If those constraints are met, then you cant do what you did with the first expression, as it isnt an equation. Theres a mistake in your last step; i have no idea how you got y = z/n there, as ny and ny would cancel, so you wouldnt be left with either y or n. You would be left with 1/x^2 = 1/z, which is z = x^2, which is what you started with. 
@Quirinus I guess it's a topic for debate but it's not strictly invalid.
Saying that, in many cases undefined or ambiguous is invalid even if there's a potentially valid result. There are often situations where division by zero returning one is valid and others where it is not.
I wouldn't call it subjective, rather contextual and possibly a problem with mathematical language having some limits.
In some cases 0 * Inf = 0 is valid and produces a valid result. In raw algebraic terms some might find that wrong but in practical terms for a given purpose it might work and sometimes might have higher validity than that.
I guess in some systems they might let you in different cases override division by zero and other cases a bit like operator overriding or even as part of it (would be extending the default as though an abstract override to give an impl for / 0 for example). 
@Quirinus You see then there's a language discrepancy. People say infinity is not a number but that doesn't cause a problem in natural langauge. A banana isn't a number but zero banana's gives me zero even though banana's aren't numbers. Similar, zero amount of infinity is zero amount of infinity.
Often equations map to some real world example where there's probably more type polymorphism and valid means of handling that which eliminate the ambiguity or define the undefined but it might not work in pure algebra.
In a sense it's just not concrete because algebra doesn't know about the real world or its context. 
@RANTSMCPANTS is it wrong to suggest that division by zero should be a special case of division with a remainder?
Only the entirety of the result is the remainder. 
@Wisecrack I'm not sure what you mean but I think it's say to say by default zero by default is invalid. The same as when you make a class extending an abstract class but don't implement the missing method it needs.
Beyond that, zero tends to do one of two things, either entirely dominate the equation (/ or *) making 0 or infinity, same result no matter what otherwise have zero effect on the result no matter what ( +). In IEEE 754 you can have 0 and 0 though which people might not think about. I don't believe the sign is transferable other than onto 0 and inf so I don't think it matters for much.
So usually people just check for 0 before the equation then do what's appropriate to the context. That might be what's in your mind, to throw and error, return 0, 1, or something else. 
@Wisecrack infinity is kind of indestructible I suppose. I mean does infinite  1 make a difference?
Presumable the remainder of infinity would then always be infinity. But I'm not really good at the maths.
Normally the remainder is from what was there before after division. If you divide 1 by 0 then 1 < infinity, infinity can't remain from 1.
Though for values under one I have no idea if or how modulus would work. I'd assume an inversion. Division < 0 is really multiplication.
Can multiplication leave a remainder? I never saw an operator for it.
12 % 11 is saying from the lowest multiple of 11 that fits entirely in 21 how much is left over if taking that from 21.
0 goes into 12 or any number infinite times. The lowest multiple is the highest possible multiple.
You can't multiply 0 by anything to get 11. Don't multiply it because you can't and the number 12 is what you get. 
@RANTSMCPANTS
Well if we're talking modulus,
25 % 4 = 1
But really isn't there something missing here?
25//4 = 6
So we can describe the same number as
(4*6)+1
If divisions 'carry around' their remainder, shouldn't mod carry around the quotient (the result of division)?
So division by zero, if it were possible, might look like
25/0 = 0 R 25*0
Likewise
25 % 0 = 0 R (n*1)+n
Also, are remainders considered part of quotients? I know the mantissa is, but thats by definition not part of mod.
I'm not so much concerned if it *is* possible, so much as if it's somehow *useful*, or what it would imply if it *were* possible in some cases, but thats completely over my head. 
@Wisecrack That's where it get's messy.
5 / 2 = 2.5
The remainder is the .5 (times 2. times 0, what's inf * 0, everything * inf is inf, everything * 0 is zero?)
5 / 0 = infinity or infinity infinity.infinity
As far as I would imagine, whatever you do to infinity you're still left with infinity. Unless inf / inf = 0 is possible but we're not dividing by inf.
There's no no two ways about it?
If there's ambiguity then that goes back to suggesting it's an abstract type. 
@Wisecrack / is opposite of * but yeh is < switches to multiplication... except not in that way.
I'm really bad at math when I'm drunk but I have seen cases where 0 and 1 are valid and others where not.
When / N < 1 reverses to be multiplication its the multiplication of one over the multiplier. IE 1 / 0.1 is really 1 * 10 but actually 1 / (1 / 10) so you're stuck with 1 / (1 / 0). Does that make an infinite loop we can use to kill the AI?
There's still the question of inf * 0 or 0 * inf.
If I do 2 * 6 it's the same as 6 * 2. I'm saying this number of that number. the total of two number sixes or the total of six number twos (that's a lot of shit).
But zero number of number infinity is zero. Infinity number of number zero is zero. No amount of zero stops being zero.
Does that mean zero takes precedent at least for multiplication? 
@RANTSMCPANTS
You know how when you don't know the value of a variable it becomes someNumber and the variable taken together?
say 5x
Or how complex numbers have have a real part and an imaginary component?
What if we treated division by infinity, or even division by 0, or for that matter division with a remainder (or mod), like that?
Also are you drunk because of pandemipocalypse?? 
@Wisecrack I'm drunk because I'm borderline alcoholic.
Do you have a logic to that (IE, downwards, overfit) or is it just if it's ambiguous and modulus gives two parts then that might give a container for ambiguity (not knowing out of two, bi, if this or that)?
Infinity is definitely the counterpart to 0 or is it. What about inf and imaginary numbers?
Irrational numbers in computing are a problem. I often thought one solution is instead to make a system that preserves to the last minute something like 1 / 3 rather than the truncated result to at least preserve precision.
You could do the same with N / 0 I guess which would sort of make sense it being an abstract type. You don't know what's what until the last instance so you can't store the result of / 0 just store / 0 until the last point where a result is really needed. 
@RANTSMCPANTS
Used to keep a bottle of vodka by the bed so I know how it is.
"that preserves to the last minute something like 1 / 3"
Thats a good idea. Another approach is some sort of algorithm to efficiently convert it to another number, say a logarithm, that preserves as much precision and accuracy as possible. 
@RANTSMCPANTS "can multiplication leave a remainder?"
Why not? If the product were some limit or the other side of an equation or other.
Or perhaps the remainder of multiplication is simply 0?
After all, if the multiplication of two numbers necessarily implies the reverse, doesn't the remainder of that division (which just so happens to be 0) also exist regardless?
Or does the remainder only exist at the point of division?
Is it a property that emerges from the relationship between two numbers or an artifact of a mathematical process (division)? What would be the implications?
That's all my thinking is. A big "what if".
Related Rants
Devrant help me out.
(n/x)*(y/x)
You know x, and you know n, and you know z where ((y/x)*x)*((x/y)*x) = z
Solve for y.
If you do it, I'll consider giving you a billion dollars (of course the payment schedule will be an asymptote).
devrant
algebra.
math