Function allows just one output per input

Function allows just one output per input.

What allows more than one output per input?

Vector outputs

You are so beyond mathematically illiterate that there is no helping you.
You can have multiple input variables, and multiple output variables can be outputted in the form of a vector, a struct, or any other method you choose.
"Only one output per input" is supposed to mean "every input causes the same output".

a set of functions that take the same input

An impure function.

Get help

Then you would have two functions. I want one "function" that gives two outputs.

I already answered your question in the first reply. What more do you want?

Incorrect answer. 0/1 points.

>0 points
>doesn't even state his question properly
Fuck off. Saged.

One function that outputs an ordered pair (or triple, quadruple, et caetera). Or if you are talking about a function in a programming language such as FORTRAN or C++, a function that takes parameters that are passed by reference and modifies them.

it's a good question OP
personally I'm wondering what will happen if you flip the right picture by 180 degrees

There are a lot of (presumably infinitely many) examples, but the most obvious would be the square root function.

Ie. f(x) = sqrt(x)
f(4) = sqrt(4) = +2,-2

When you have something like (x+1)(x+3)

Wrong.
Sqrt (x^2) = |x|
You're right about pseudo functions though.

>What allows more than one output per input?
Nothing.

If we think of functions as taking in a set input and giving out a set output. For example, the example given here can easily be done as a function.

The function [math] \sqrt{x} [/math] takes as input a single number and it gives back a set of two numbers. For example, [math] \sqrt{4} = \{2,-2 \} [/math]

"two outputs" is a single output, a pair of two things

Please tell me that you're trolling, OR CS majors.

kek go on. Tell me what is wrong with what I said. I'm by the way.

You can still call it a function. Pic related for example is a function called squarecube that returns two different outputs for one input.

Square root can't be equal to a negative number. If you honestly can't see this, I am at loss of words. You are confusing quadratic function with this.

>Square root can't be equal to a negative number.
Why not? Okay, I guess it is my fault for not making my definition explicit. (And I stress, I am imposing my own definition in my post. Obviously, in typical use you only include the positive values).

Anyways, the definition is:
[math] \sqrt{x} = \{y \in \mathbb{R} : y^2 = x \} [/math]

And that is the square root, having both branches realized as a single function. And you can do this with any relation.

Not that guy, but { r , -r } is a subset, but not element of R . So this output is not defined unless you restrict the mapping or change the target to R x R .

In any case, a function is defined as each element of the domain being mapped to a single element of the target, so if 4 is mapped to 2 and -2 the relation is not a function by definition.

>Not that guy, but { r , -r } is a subset, but not element of R
So what? Not all functions have to be from R to R, you know that right?

> or change the target to R x R
Wrong again. RxR is a set of ordered pairs and I am using sets. Looks like you don't even know basic set theory which it's sad because I actually thought I was speaking with someone capable of understanding me.

Anyways, the function I defined can clearly be realized as a function [math] \mathbb{R} \to P(\mathbb{R}) [/math]. To be simplistic, obviously.

>so if 4 is mapped to 2 and -2 the relation is not a function by definition.

But that is why I am grouping both of the values into a single set. And then mapping to that single set. It is not two objects. It is a single object.

>computer engineering
>muh logic circuits

vector outputs work when the outputs are orthogonal. For square roots you have to use tuples.

I think he's talking about "vectors" as in C++ (or other language equivalent) vectors. In which case he's just talking about an object that acts as an array with an arbitrary / dynamic size to it.

You defined the target of your relation as R in your last post.

Also you can't construct the Cartesian product R x P(R) so I don't know why you would choose it over the Euclidean space R x R X R . I was just trying to be helpful.

That's my assumption, but I think it's useful to be pedantic since it is a pretty big distinction that we usually gloss over. It always annoyed me that dynamic arrays got the vector name since a vector is a collection of orthogonal values.

>You defined the target of your relation as R in your last post.

No I did not. My definition was. [math] \sqrt{x} = \{y \in \mathbb{R} : y^2 = x \} [/math]

It maps a real number to a subset of the real numbers. A subset of the real numbers is an element of the power set of the real numbers. It is all very clear.

>Also you can't construct the Cartesian product R x P(R)
Why? Please explain this one.

Functions are defined as having a single output.

It depends on what definition you're using.
Why do math-fags think their definitions are the only definitions that exist?

Go away Terrence.

This is just childish and ridiculous. Please leave.

I would assume y is your target and you have y being an element of R , again { r , -r } is not an element of R .

If y is your domain, then the relation is injective just by mapping R -> R and I don't understand the reason for using P(R) as the target.

There isn't a bijection between R and P(R) so you'll run into a handful of problems that are beyond the scope of this post.

What? Did you reply to the wrong post by accident? There's this thing called programming where words like function can mean something different from your narrowly defined mathematical sense of the word. You know, that thing that lets you make shitposts like that one possible?

>I would assume y is your target
No. y is used to define my set. You don't even know how to read set theory, do you?

>There isn't a bijection between R and P(R) so you'll run into a handful of problems that are beyond the scope of this post.

I love how you know fuck all about basic set theory but you sound like you spend hours reading Wikipedia tier meme articles about math.

I'm sorry I couldn't help you, I will not reply further.

>There's this thing called programming where words like function can mean something different from your narrowly defined mathematical sense
Ha, your programming definition isn't more general than the mathematical definition, buddy.

It's more general in the specific sense of not limiting to one output which is the actual topic of discussion here.

Functions.
The output of a function can be a member of the Cartesian product of two sets.

Your second image is function too...

That is called a function.
A function is a mapping between sets.

You are wrong. Delete your post.

You are wrong. Delete your post.

You are wrong. Delete your post.

You are correct. Why are people arguing and ignoring the only person being actually right?

There is actually a mistake in the first table, you can expand the line in the third row further.
Or am I missing something.

Lord help this autist.

>ctrl+f multifunction
>no results
>no mention of coalgebra

Step it up Veeky Forums.

A relation. A relation just means that there's some connection between the input and output, so every function is a relation, but not every relation is a function.

Yep

You are an arrogant prick.
You aren't talking about the square root function, you are talking about some other function that you have made up.

Square root function is explicitly defined as a map from the nonnegative reals to the nonnegative reals. What you are referring to is a consequence of the fact that two negative numbers multiplied form a positive number, and actually has nothing to do with the square root function whatsoever.

everyone understands that the (square) roots have branches

my bad misread posts and got over emotional~

What do you even mean? A function where f(a)=b and f(a)=c with b=/=c? That would violate the law of noncontradiction.

i realised it too. i dont know what they did there. maybe they used another method or something. there are two difference colors of groupings for some reason.

Vector valued functions. Imput a scalar, and get a vector. Think of a particle moving around in space, in a circular pattern; a vector valued function traces out the entire path.

So the output is a vector. So what ? There's still only one output.

There is a reason functions are defined to have only one output and that same reason applies to functions in programming; otherwise it'll be a shitfest. You know nothing about math or programming, get out of here.

>i want a function that is not a function
If what you want is a process that relates one input to two or more outputs (an n-tuple is still just one value), then you need a relation, not a function. If you drop the autism a tell us what you want to do, we may be able to provide better help.

void return_two(bool input) {
if(input) {
cout

var fun = function(var x) {
var d1 = x * 10;
var d2 = x * x + d1;
return [d1, d2];
};
var f = fun(10);
alert(f[0]);
alert(f[1]);

Nope, the definition is

>when I group data in a data structure then it becomes just one thing!
congratulations, you discovered the most basic shit CS can offer to you.

>not using es6