!GzgmQVAObunAgMNkvU:matrix.org

FSUG-TVM Main (Free Software User Group, Thiruvananthapuram)

486 Members
Anyone can see what you discuss here | Website: https://tvm.fsug.in/ | Meetings History: https://git.fosscommunity.in/fsugtvm/meetings45 Servers

Load older messages


SenderMessageTime
20 Mar 2023
@telegram_235671675:tchncs.deMr. Nix (Telegram)nop17:41:02
22 Mar 2023
@telegram_409300472:tchncs.deBeta S (Telegram)image.jpeg
Download image.jpeg
14:12:29
@telegram_409300472:tchncs.deBeta S (Telegram)Photo from Maths Tuition14:12:29
@gokuldas:matrix.orggoku12
In reply to @telegram_409300472:tchncs.de
sent an image.
Isn't it right?
14:22:56
@telegram_409300472:tchncs.deBeta S (Telegram)Yes ..but I am confused ..can you give me an explanation...14:45:38
@aryak:projectsegfau.ltArya [projectsegfau.lt]24-25 is -114:46:37
@aryak:projectsegfau.ltArya [projectsegfau.lt]-1 doesnt have a square root14:46:42
@aryak:projectsegfau.ltArya [projectsegfau.lt]*cannot14:46:47
@aryak:projectsegfau.ltArya [projectsegfau.lt]

sqrt -1

sqrt(−1) = i

14:47:32
@aryak:projectsegfau.ltArya [projectsegfau.lt]from qalc14:47:34
@telegram_409300472:tchncs.deBeta S (Telegram) https://stackoverflow.com/questions/75802905/java-is-square-root-of-a-negative-number-a-logical-error-or-a-runtime-error

But the answer over here that makes me confused ..they are telling we can tell it based on context only
14:50:46
@telegram_409300472:tchncs.deBeta S (Telegram)That may be context depend14:51:42
@telegram_409300472:tchncs.deBeta S (Telegram)They are telling ..I am totally confused by the answer over there14:52:09
@telegram_293342249:tchncs.deMadhav V⸙ꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋ (Telegram)
In reply to Beta S (Telegram)
That may be context depend
Function works as it is designed. How you use the return value decides whether it is an error or not.
15:03:55
@telegram_293342249:tchncs.deMadhav V⸙ꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋ (Telegram)If the dev is lazy then that statement is no error. If not as that person said, its a logical error that may lead to run time error if not handled.15:05:12
@telegram_293342249:tchncs.deMadhav V⸙ꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋ (Telegram)Just my 1 rupee15:05:18
@gokuldas:matrix.orggoku12
In reply to @telegram_409300472:tchncs.de
Yes ..but I am confused ..can you give me an explanation...

A syntax error happens when a compiler or interpreter can't convert a program into machine code. The given code looks like valid Java syntax and should compile to JVM bytecode.

A runtime error happens when some error is triggered that's not dependent on your code. Things like out of memory, invalid memory access, race conditions etc.

Logic error happens when your code logic triggers a predicate error. In this case, your code logic is trying to take the sqrt of a negative number. That triggers an error. So it's a logic error.

15:08:11
@telegram_293342249:tchncs.deMadhav V⸙ꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋ (Telegram)* If the dev is lazy then that statement is not error. If not then as that person said, its a logical error that may lead to run time error if not handled.15:08:12
@gokuldas:matrix.orggoku12Redacted or Malformed Event15:09:22
@gokuldas:matrix.orggoku12* Predictable, not predicate15:09:37
@gokuldas:matrix.orggoku12* A syntax error happens when a compiler or interpreter can't convert a program into machine code. The given code looks like valid Java syntax and should compile to JVM bytecode. A runtime error happens when some error is triggered that's not dependent on your code. Things like out of memory, invalid memory access, race conditions etc. Logic error happens when your code logic triggers a predictable error. In this case, your code logic is trying to take the sqrt of a negative number. That triggers an error. So it's a logic error.15:11:21
@telegram_409300472:tchncs.deBeta S (Telegram)
In reply to @gokuldas:matrix.org

A syntax error happens when a compiler or interpreter can't convert a program into machine code. The given code looks like valid Java syntax and should compile to JVM bytecode.

A runtime error happens when some error is triggered that's not dependent on your code. Things like out of memory, invalid memory access, race conditions etc.

Logic error happens when your code logic triggers a predicate error. In this case, your code logic is trying to take the sqrt of a negative number. That triggers an error. So it's a logic error.

A very meaningful answer..really enlightening and satisfiable one..thanks gokulji
15:14:54
@gokuldas:matrix.orggoku12
In reply to @aryak:projectsegfau.lt
24-25 is -1

Sqrt of -1, or even division by zero are not always errors. For example, floating point division by zero gives infinity instead of error. Similarly, some languages gives sqrt of -1 as i (complex number). It's really a mathematical concept where you can define what's acceptable and what is not.

A long time ago, negative numbers were considered impossible just like how sqrt -1 is today.

15:19:49
@gokuldas:matrix.orggoku12Redacted or Malformed Event15:21:51
@telegram_293342249:tchncs.deMadhav V⸙ꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋꠋ (Telegram)Btw why are they teaching java at maths tuition 🧐?15:22:14
@gokuldas:matrix.orggoku12
In reply to @telegram_293342249:tchncs.de
Btw why are they teaching java at maths tuition 🧐?
Always asking the right questions! 😆
15:22:49
@gokuldas:matrix.orggoku12Applied math, perhaps?15:24:29
27 Mar 2023
@aryak:projectsegfau.ltArya [projectsegfau.lt]does anyone using airtel fiber here have issues connecting to codeberg?18:02:17
@aryak:projectsegfau.ltArya [projectsegfau.lt]i can connect but most of the times its really slow18:02:26
@aryak:projectsegfau.ltArya [projectsegfau.lt]with mtr codeberg.org the packet loss is rare and when it happens its like barely 2-5%18:02:41

There are no newer messages yet.


Back to Room ListRoom Version: