Timeline for Find the absolute value of a number without built-in functions
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 17, 2020 at 9:04 | history | edited | CommunityBot |
Commonmark migration
|
|
May 24, 2016 at 18:25 | history | edited | Timtech | CC BY-SA 3.0 |
added 31 characters in body
|
Dec 4, 2015 at 12:05 | comment | added | Timtech | Interesting, nice alternative :) | |
Dec 2, 2015 at 1:18 | comment | added | lirtosiast |
That's not how Anscos(angle(Ans works. angle( returns pi for negative numbers and 0 for nonnegative numbers. cos( returns -1 for pi and 1 for 0. Therefore, you're multiplying the number by its sign function, except for 0 which doesn't matter.
|
|
Dec 2, 2015 at 0:26 | comment | added | Timtech | Thanks for that suggestion - it's smart since cos(x) = cos(-x) | |
Dec 2, 2015 at 0:25 | history | edited | Timtech | CC BY-SA 3.0 |
added 31 characters in body
|
Dec 1, 2015 at 23:36 | comment | added | lirtosiast |
There's also Anscos(angle(Ans at 5 bytes, which is interesting.
|
|
Dec 1, 2015 at 23:23 | history | edited | Timtech | CC BY-SA 3.0 |
added 173 characters in body
|
Dec 1, 2015 at 23:15 | comment | added | Timtech | @ThomasKwa Didn't notice that other answer (that was a while ago), thanks for the notice, I'll delete it and add a better version as an alternate here. | |
Nov 29, 2015 at 20:31 | comment | added | lirtosiast | Maybe edit this into your other answer instead? (I'll undownvote it if you do) | |
Nov 29, 2015 at 14:45 | review | Low quality posts | |||
Nov 29, 2015 at 15:08 | |||||
Nov 29, 2015 at 14:28 | history | answered | Timtech | CC BY-SA 3.0 |