[Question]
  [
[American odds](https://en.wikipedia.org/wiki/Fixed-odds_betting#Moneyline_odds) (aka *moneyline odds*) are numbers like \$+150\$ or \$-400\$ used to express how much a winning bet would pay out. Convert odds to a fair win probability like this:
* Positive odds \$+n\$ with \$n \geq 100\$ correspond to $$p=\frac{100}{100+n},$$ producing a probability with \$0 < p \leq 1/2\$.
* Negative odds \$-n\$ with \$n > 100\$ correspond to $$p=\frac{n}{100+n},$$ producing a probability with \$1/2 < p < 1\$.
Note that in both formulas above, \$n\$ is the absolute value of the input. Inputs with absolute value under \$100\$ are invalid, and so is \$-100\$ (since \$+100\$ is used for \$p=1/2\$), so you don't need to handle these.
The input will be a whole number. If you take it as a string, expecting a leading `+` for positive values is optional.
Your output can be a decimal to some reasonable precision or a reduced fraction.
**Test cases**
```
+1500   0.0625
 +256   0.2808988764044944
 +100   0.5
 -200   0.6666666666666666
 -300   0.75
```
  
[Answer]
# [Python](https://www.python.org), 25 bytes
```
lambda x:x/(~99-abs(x))%1
```
[Attempt This Online!](https://ato.pxeger.com/run?1=XY1LDoIwFEXnrOJNTNrwsWCBloS5i9BBiRBroDRQDU7ciBMSo3twKezGKox8o3tzTu67v_TVHFs1Pqp89zybymfvWjTFQcCQDWt049wXRY8GjFfhzKdt1XZQS1WCVNDqUiGCMwdAenCCHBqhUXkRtfdVgl7X0iCMLdedVAZZq0ISWxfPe-O0d8OYEAAgAUmi2AE3ipNfjRhhnLE0oYRSTqlF4WJazY-WnPydRZsFpfH85QM)
#### Thanks @Jonathan Allan for -1.
### Original [Python](https://www.python.org), 26 bytes
```
lambda x:-x/(100+abs(x))%1
```
[Attempt This Online!](https://ato.pxeger.com/run?1=Xc1BDoIwEEDRPaeYjUkbBAdsoZCw9xC6KBFiDZQG0OBZ3JAYPYQ34TZWYWVXM_kv0_vL3PpTo8dHme2fl770xLuSdX6UMKTesCEBoivzjgyUroIZTLuyaaFSugCloTGFJkhTB0Ct4QwZ1NKQ4iqr9Zf4nalUTyi13bRK98SqkihqLZ3vjdPBDTgiAKCPUcgdcEMe_dZQoEiEiCOGjCWM2RQs0jIvXObo79m0XVLM518-)
Test bed from @MTN via @AnttiP.
### How?
Based on the observation
\$-n \equiv 100 \mod 100+n\$
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 7 bytes
```
,³ṢAÄ÷/
```
[Try it online!](https://tio.run/##y0rNyan8/1/n0OaHOxc5Hm45vF3/v6GpgYGOkamZjiGQ1jUCEcYGBofbHzWt@Q8A "Jelly – Try It Online")
Function I/O only because lmao `³`. (Replace with `ȷ2` if that's too borderline.)
```
                                  n ≥ 100         | n < -100
,³         Pair n with 100.       [n, 100]        | [n, 100]
  Ṣ        Sort.                  [100, n]        | [n, 100]
   A       Map absolute value.    [100, n]        | [-n, 100]
    Ä      Cumsum.                [100, 100 + n]  | [-n, 100 - n]
     ÷/    Divide.                100 / (100 + n) | -n / (100 - n)
```
[Answer]
# [R](https://www.r-project.org), 24 bytes
```
\(n)(-n/(100+abs(n)))%%1
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGiNNulpSVpuhY7YjTyNDV08_Q1DA0MtBOTioFcTU1VVUOI9E3l4sSCgpxKjWQNQ1MDAx0jUzMdoEIdXSMQYWxgoKmTpglRumABhAYA)
Port of [loopy walt's Python answer](https://codegolf.stackexchange.com/a/265181/55372).
[Answer]
# [Python](https://www.python.org), 33 bytes
```
lambda n:1/[1+n/100,1-100/n][n<0]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=XY1NDoIwEEb3nGJ01Ya_KRasRk6iLGqEWINDg2jiWdyQGL2Tt7EIK2cxmS_vTb7H2967Y0P9s8p3r2tXheozq_V5f9BAaxFvhU-xQAxE6HZMxZY2WEyirpoWakMlGILGlsSQR22pD4xHF1ubbmAXxtcegAngBDmctWXlTdfBgEaJzQFgzrmTbGuoY06tmOHugY9F_afwRYroPIwwS1IP_CTNfjFRqFZKLTOJUq6kdEhMptPCZLqzv3FoMaFlOrZ8AQ)
Testing code from [MTN's answer](https://codegolf.stackexchange.com/a/265170/84290)
[Answer]
# [Ruby](https://www.ruby-lang.org/), ~~29~~ 26 bytes
```
->n{(n>0?100:n=-n)/n+=1e2}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuha7dO3yqjXy7AzsDQ0MrPJsdfM09fO0bQ1TjWohCm4GFqUmpuRk5qUW66UmJmcopOQr1IC4NVwKCgWlJcUKII5eSmpOakmqhlJMnpKmgraCkoICEGsrpEWDZUvy4zNjQWQxV2peCsTgBXu1DU0NDLgUtI1MzYCkIYitawQmjQ0MIIoA)
Saved 3 bytes thanks to @MTN and @G B.
Ports [Luis felipe De jesus Munoz’s JavaScript submission](https://codegolf.stackexchange.com/a/265171/108687).
# [Ruby](https://www.ruby-lang.org/), ~~34~~ 28 bytes
```
->n{[-n,o=1e2].max/o+=n.abs}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuhZ7dO3yqqN183TybQ1TjWL1chMr9PO1bfP0EpOKayFKbgYWpSam5GTmpRbrpSYmZyik5CvUgLg1XAoKBaUlxQogjl5Kak5qSaqGUkyekqaCtoKSggIQayukRYNlS_LjM2NBZDFXal4KxOAFe7UNTQ0MuBS0jUzNgKQhiK1rBCaNDQwgigA)
Thanks to @G B for saving 8 bytes!
I'm still learning Ruby, so this answer might be improvable, although @G B has improved it quite a bit already.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 55 [bitsv2](https://github.com/Vyxal/Vyncode/blob/main/README.md), 6.875 bytes
```
₁"sȧ¦ƒ/
```
[Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyJ+PSIsIiIsIuKCgVwic8inwqbGki8iLCIiLCIrMTUwMCA9PiAwLjA2MjVcbisyNTYgID0+IDAuMjgwODk4ODc2NDA0NDk0NFxuKzEwMCAgPT4gMC41XG4tMjAwICA9PiAwLjY2NjY2NjY2NjY2NjY2NjZcbi0zMDAgID0+IDAuNzUiXQ==)
Port of Jelly.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 50 [bitsv2](https://github.com/Vyxal/Vyncode/blob/main/README.md), 6.25 bytes
```
ȧ₁+/N1%
```
[Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyJ+PSIsIiIsIsin4oKBKy9OMSUiLCIiLCIrMTUwMCA9PiAwLjA2MjVcbisyNTYgID0+IDAuMjgwODk4ODc2NDA0NDk0NFxuKzEwMCAgPT4gMC41XG4tMjAwICA9PiAwLjY2NjY2NjY2NjY2NjY2NjZcbi0zMDAgID0+IDAuNzUiXQ==)
Port of [loopy walt's Python](https://codegolf.stackexchange.com/a/265181/85334). It's longer in Jelly due to the argument order for division, but I intuited it would at least tie in Vyxal SBCS bytes, and it turns out it also Vyncodes marginally better.
```
 ₁+        Add 100 to
ȧ          the absolute value of n.
   /       Divide n by that,
    N      negate the result,
     1%    and mod 1.
```
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 12 bytes
```
-a/(h+ABa)%1
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724ILNgWbSSboFS7IKlpSVpuhZrdBP1NTK0HZ0SNVUNIUJQmWXRuiYGBjB1AA) | *[Based on @loopy\_walt's Python answer](https://codegolf.stackexchange.com/questions/265168/american-odds-to-probabilities/265181#265181)*
Trivial implementation, 16 bytes.
```
(@YABSNgAEh)/$+y
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724ILNgWbSSboFS7IKlpSVpuhYbNBwiHZ2C_dIdXTM09VW0KyHCUNll0bomBgYwtQA)
[Answer]
# [JavaScript (Babel Node)](https://babeljs.io/), 25 bytes
```
_=>(_>0?100:_=-_)/(100+_)
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNFNSkxKzdHNy09J/Z9m@z/e1k4j3s7A3tDAwCreVjdeU18DyNSO1/yfnJ9XnJ@TqpeTn66RpmFoamCgqcmFKmhkaoYhZohFna4RNkFjkOB/AA "JavaScript (Babel Node) – Try It Online")
[Answer]
# Excel, 30 bytes
```
=1/(1+IF(A1<0,-100/A1,A1/100))
```
Input in cell `A1`.
[Answer]
# [Arturo](https://arturo-lang.io), 34 bytes
```
$->n[abs//(n<0)?->n[100]100+abs n]
```
[Try it!](http://arturo-lang.io/playground?PgvHMN)
[Answer]
# [R](https://www.r-project.org), 31 bytes
```
\(n)"if"(n<0,n<--n,100)/(100+n)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGSNAUb3aWlJWm6FvtjNPI0lTLTlDTybAx08mx0dfN0DA0MNPU1gKR2niZE1U3l4sSCgpxKjWQNQ1MDAx0jUzOQKh1dIxBhDFSvkwZVumABhAYA)
# [R](https://www.r-project.org), 31 bytes
```
\(n,z=sign(n))1/(1+(n/100)^z*z)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72waMGSNAUb3aWlJWm6FvtjNPJ0qmyLM9PzNPI0NQ31NQy1NfL0DQ0MNOOqtKo0Iar2pGkkaxiaGhjoGJma6QAldXSNQIQxUBlUyYIFEBoA)
I feel like *one* of these can be golfed down.
[Answer]
# [J](https://www.jsoftware.com), 9 bytes
```
1|-%100+|
```
-5 bytes by porting [loopy walt's answer](https://codegolf.stackexchange.com/a/265181/15469)!
[Attempt This Online!](https://ato.pxeger.com/run?1=m70wa8FNVUtFK8NYM0UrS3V1LiU99TQFWysFdQUdBQMFKyDW1VNwDvJxW1pakqZrsdKwRlfV0MBAuwbCv7lVk8vPSU8BKKSmoWGnp6upqqFdo6nJlZqcka-QpmBoamAAYxuZmsGFEaLxRkhsYxC7IrME6BBtkFYFBQUDPQMzI1MuBW2gdjDXyMLAwtLCwtzMxMDExNLEBChlCFUJVKZrBGWboQGglDFUytwU4vgFCyA0AA)
## [J](https://www.jsoftware.com), original answer, 14 bytes
```
(100>.-)%100+|
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m70wa8FNVUtFK8NYM0UrS3V1LiU99TQFWysFdQUdBQMFKyDW1VNwDvJxW1pakqZrsU7D0MDATk9XUxVIa9dABG9u1eTyc9JTAAqpaWiAZTW0azQ1uVKTM_IV0hQMTQ0MYGwjUzO4MEI03giJbQxiV2SWAF2jDdKqoKBgoGdgZmTKpaAN1A7mGlkYWFhaWJibmRiYmFiamAClDKEqgcp0jaBsMzQAlDKGSpmbQhy_YAGEBgA)
* `100>.-` The larger of the negative of the input and 100
* `%` Divided by...
* `100+|` 100 plus the absolute value of the input
My attempts to avoid repeating 100 led to longer solutions.
[Answer]
# [Forth (gforth)](http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/), ~~51~~ 42 bytes
```
: f dup 100 min abs s>f abs 100 + s>f f/ ;
```
[Try it online!](https://tio.run/##JYs9DoAgFIN3TtG4GhAwOEjCXfzJUweVgJ4fAZd@bdPSHZ6db1SQ0gjC@nooKXEeF6Y5IjqqLF1bE3Wweerr1EAEiAbgDk2@k8ASYBlTJh8802bIqqrn@kdfkD4 "Forth (gforth) – Try It Online")
## Explanation
Originally, I used a conditional statement, but those use a lot of characters in gforth. I eventually realized that the goal is mostly just to determine what goes on top of the fraction, 100 or n. Since n will always be greater than 100 or less than -100, we can use min to get the value we want (if negative, n will always be less than 100, if positive, 100 will always be smaller).
## Code Explanation
```
: f         \ Begin word definition
  dup       \ duplicate n on the top of the stack
  100 min   \ take the smaller of n and 100
  abs s>f   \ send the absolute value to the floating point stack
  abs 100 + \ add 100 to the absolute value of n
  s>f       \ move the result to the floating point stack
  f/        \ divide the top two floating point stack values
;           \ end word definition
```
[Answer]
# [Julia](https://julialang.org), ~~29~~ 24 bytes
```
!n=mod(n/(~99-abs(n)),1)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m700qzQnM3HBgqWlJWm6FjsU82xz81M08vQ16iwtdROTijXyNDV1DDUh0jcXOBRn5JcrKOoaGRhwOSQWF6cWlSgoGpoaGCg86uxQUDDQMzAzMkXIGJmaKcBkjCwMLCwtLMzNTAxMTCxNTJD0A7XDVCFpBlkCEzZDA0iqjBGqzE0h7oR5BwA)
A port of [loopy walt's solution](https://codegolf.stackexchange.com/a/265181/114865).
`mod` is used (suggested by MarcMush), since Julia's default modulo `%` doesn't match [Python's convention for negative numbers](https://stackoverflow.com/questions/3883004/how-does-the-modulo-operator-work-on-negative-numbers-in-python); using `rem` with rounding mode `RoundDown` would also work.
[Answer]
# [Python](https://www.python.org), 37 bytes
```
lambda n:(100,x:=abs(n))[n<0]/(100+x)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=XY1NboNADEb3OYUVKZItfmLoABMUTtJkMVFAnYoMIyBVepZskKLmTrlNhzKremV_71nf_Wm_x4_OTI-mOvxcxyaSr02rLqezAlNiwhzeykqdBjRE72bPx-0cBjfysmq6HlptatAGOlsbZIr7Wp2R4sG2epzZgFSuAHQIn1DBRVmsv1QbzmiRcA0AayIn2V6bEZ3aoCb34Ium1zFIMmbnccx5mq0gSLP870wly52URS5YiJ0QDiXedFqU-j3_Nw69eVRkS8sv)
[Answer]
# [Octave](https://www.gnu.org/software/octave/) / MATLAB, 30 bytes
```
@(n)min(100,n)/(n+100*sign(n))
```
[Try it online!](https://tio.run/##y08uSSxL/Z9mq6en999BI08zNzNPw9DAQCdPU18jTxvI0irOTM8DSmj@T9MwNDUw0PwPAA "Octave – Try It Online") Or [verify all test cases](https://tio.run/##y08uSSxL/Z9mq6en999BI08zNzNPw9DAQCdPU18jTxvI0irOTM8DSmj@T8svyk0sUcjJz0vnSiwqSqxMK83TSNNRiDY0NTCwVjAyNbNWMASxdI3ApLGBQazmfwA).
[Answer]
# [05AB1E (legacy)](https://github.com/Adriandmen/05AB1E/wiki/Commands/2649a799300cbf3770e2db37ce177d4a19035a25), 7 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
Äт+/(1%
```
Port of [*@loopyWalt*'s Python answer](https://codegolf.stackexchange.com/a/265181/52210), so make sure to upvote that answer as well!
[Try it online](https://tio.run/##MzBNTDJM/f//cMvFJm19DUPV//@1jUzNAA) or [verify all test cases](https://tio.run/##MzBNTDJM/V9Waa@k8KhtkoKSfaXL/8MtF5u09TUMVf/r/I9W0jY0NTBQ0lHSNjI1A1GGIJ6ukYGBjq6xgUEsAA).
A port of [*@UnrelatedString*'s Jelly answer](https://codegolf.stackexchange.com/a/265169/52210) (in the [new 05AB1E version](https://github.com/Adriandmen/05AB1E/wiki/Commands)) would be a byte longer:
```
т‚{ÄηO`/
```
[Try it online](https://tio.run/##yy9OTMpM/f//YtOjhlnVh1vObfdP0P//X9vI1AwA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfaXL/4tNjxpmVR9uObfdP0H/v87/aCVtQ1MDAyUdJW0jUzMQZQji6RoZGOjoGhsYxAIA).
**Explanation:**
```
         #  Example inputs: +256               -256
```
Uses the legacy version of 05AB1E built in Python 3 for `1%` to work. In the new version built in Elixir, it'll give incorrect results.
```
Ä        # Get the absolute value of the (implicit) input-integer
         #                  256                256
 т+      # Add 100 to it
         #                  356                356
   /     # Divide the (implicit) input by this abs(input)+100
         #                  0.719...           -0.719...
    (    # Negate it
         #                  -0.719...          0.719...
     1%  # (Python-style) modulo-1
         #                  0.280...           0.719...
         # (after which it's output implicitly as result)
```
Uses the new version of 05AB1E builtin Elixir for `{` to work. In the legacy version, it'll always keep the input first because it's seen as [string,integer] instead of [integer,integer].
```
т‚       # Pair the (implicit) input-integer with 100
         #                  [256,100]          [-256,100]
  {      # Sort this pair
         #                  [100,256]          [-256,100]
   Ä     # Get the absolute value of each
         #                  [100,256]          [256,100]
    η    # Get the prefixes of this pair
         #                  [[100],[100,256]]  [[256],[256,100]]
     O   # Sum each inner list
         #                  [100,356]          [256,356]
      `  # Pop and push both values separated to the stack
       / # Divide them from one another
         #                  0.280...           0.719...
         # (after which it's output implicitly as result)
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 18 bytes
```
ＮθＩ∕↔⌊⟦¹⁰⁰θ⟧⁺¹⁰⁰↔θ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/98zr6C0xK80Nym1SKNQ05oroCgzr0TDObG4RMMlsywzJVXDMak4P6e0JFXDNzMvM7c0VyPa0MBAR6EwVlNTRyEgp7RYA8yHKyvUBAHr//91jQ0M/uuW5QAA "Charcoal – Try It Online") Link is to verbose version of code. Explanation: Turns out to be a port of @noodleman's original Ruby answer.
```
Ｎθ                  Input `n` as a number
       ¹⁰⁰          Literal integer `100`
          θ         Input `n`
      ⟦    ⟧        Make into list
     ⌊              Take the minimum
    ↔               Absolute value
   ∕                Divided by
             ¹⁰⁰    Literal integer `100`
            ⁺       Plus
                 θ  Input `n`
                ↔   Absolute value
  Ｉ                 Cast to string
                    Implicitly print
```
A slightly less accurate version is 16 bytes:
```
ＮθＩ∕χ⁺χ⌈⟦∕θχ±∕φθ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/98zr6C0xK80Nym1SKNQ05oroCgzr0TDObG4RMMlsywzJVXD0EBHISCntBjM8E2syMwtzdWIhkoW6igYGmjqKPilpieWpCK0GADVFmpqxmqCgPX//7rGBgb/dctyAA "Charcoal – Try It Online") Link is to verbose version of code. Explanation: "Illegal" positive odds and negative odds can be converted into "legal" odds by dividing into `-10000`, but we can also use this to convert all odds into positive odds and then use a modified version of the formula for those odds, the modification being `10/(10+n/10)`, since this is golfier in Charcoal.
```
Ｎθ                  First input as a number
    χ               Predefined variable `10`
   ∕                Divided by
      χ             Predefined variable `10`
     ⁺              Plus
          θ         Input odds
         ∕          Divided by
           χ        Predefined variable `10`
              φ     Predefined variable `1000`
             ∕      Divided by
               θ    Input odds
            ±       Negated
        ⟦           Make into list
       ⌈            Take the maximum
  Ｉ                 Cast to string
                    Implicitly print
```
[Answer]
# [Uiua](https://www.uiua.org/), 10 [bytes](https://codegolf.stackexchange.com/a/265917/95126)
```
◿1`÷+100⌵.
```
[Try it online!](https://www.uiua.org/pad?src=ZiDihpAg4pe_McKvw7crMTAw4oy1LgpmIDE1MDBfMjU2XzEwMF_CrzIwMF_CrzMwMA==)
Port of [loopy walt's Python answer](https://codegolf.stackexchange.com/a/265181/11261). If scored in UTF-8, beats the solution I wanted to post even harder because ``` [autoformats](https://www.uiua.org/docs/basic#formatting) to `¯` to save a single byte.
The solution I wanted to post:
# [Uiua](https://www.uiua.org/), 11 [bytes](https://codegolf.stackexchange.com/a/265917/95126)
```
÷+,⊙⌵⊃↥↧100
```
[Try it online!](https://www.uiua.org/pad?src=ZiDihpAgw7crLOKKmeKMteKKg-KGpeKGpzEwMApmIDE1MDBfMjU2XzEwMF_CrzIwMF_CrzMwMA==)
Indirect port of [my Jelly solution](https://codegolf.stackexchange.com/a/265169/85334). A [direct port](https://www.uiua.org/pad?src=ZiDihpAgL8O34oeMXCvijLXiio_ijY8u4oqfMTAwCuKItWYgMTUwMF8yNTZfMTAwX8KvMjAwX8KvMzAw) comes out considerably longer due to scan/reduce operating right to left and it taking 3 characters to sort an array, but `⊃↥↧ fork max min` sorts the top two values on the stack right in place on the stack, taking arrays out of the picture entirely... unfortunately also needing an extra `⊙ dip` (or some restructuring and a `: flip`) to abs afterwards.
[Answer]
# Google Sheets, 25 bytes
`=mod(-A1/(abs(A1)+100),1)`
Put the input in cell `A1` and the formula in `B1`.
Uses `mod()` like the [Python answer](https://codegolf.stackexchange.com/a/265181/119296).
[Answer]
# [Ruby](https://www.ruby-lang.org/), 21 bytes
Direct port of [loopy walt's Python answer](https://codegolf.stackexchange.com/a/265181/11261), for completeness.
```
->n{n/(-1e2-n.abs)%1}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsEiN9ulpSVpuhZbde3yqvP0NXQNU4108_QSk4o1VQ1rIXI3zcszMnNSFdJTS4o1kjPycwusFEqKSlM1uRQUCkpLihWUlFXiY0qUq92iVeL1SvLjM2NrlbhS81Ig2hfs1TY0NTDgUtA2MjUDkoYgtq4RmDQ2MIAoAgA)
[Answer]
# [C (GCC)](https://gcc.gnu.org), ~~49~~ ~~36~~ ~~34~~ 33 bytes
```
f(n,r){r=(n?100:(n=-n))/(1e2+n);}
```
Saved a byte by negating `n` within the ternary and eliminating the `abs` call.
[Attempt This Online!](https://ato.pxeger.com/run?1=XVDdToMwFL7nKY5LSNpRtNTCmIg-yCRmYevSRMvSFW8I72HiDRfuofY2HihZ1Cbnp9_5-875Otevh7oeLp91Y04OtBnl2LrTpoISOoiSlHMGkUgz1Mnox2LS95xDXwS-Tr01WwdN636VAvBbnomUTZ7Ieb7O81UmuZRrKT06B7N_z6OrFAecW6fi_HKjiGGWdrYk5hlpPBBTxobSO5LsRWRo0c-J3-MK71ttyEejdxS6AEA1Fsi0GhLjBZpHSNFEkY_DzH9p967wfzJfQVcMEKUePlrsosgi3EH8BKGCTaiqF7Ng8DedXU-hq6m0R0G8tQbnBzPXYfD2Bw)
---
```
f(n,r){r=(n?100:-n)/(1e2+abs(n));}
```
Changed `100.0` to `1e2` to save 2 bytes, since want 100 as float.
[Attempt This Online!](https://ato.pxeger.com/run?1=XVBdToQwEH7nFBMSklaKFgSWFVcPspINsttNk7XdlOIL4R4mvvDgHmpv40CJUZvMfNNv_ufz0uyOTTNePxqtWgtSTXLubLutYAM9hHHGOYMwyXLU8WRHyazvOYeh9FyeOOnagu7sr1QAfsvzJGOzlRS8WBfFKk95mq7T1LGLM__3HLvKsMGlsyIqrr4gihnamw1RzzjGQ6ToHYkPSVi_tkRRWg5L5Ne0w1stFXnXck-h9wCENkDm3XAyXiI8QoYQhs4PywI35mBL9yfLGWTFAFnq6LPBKoL4wR6iJwgEbANRvSifwd9w9nMLWc2pAwrynVHY31tmHUeH3w)
---
```
f(n,r){r=(n?100:-n)/(100.0+abs(n));}
```
Changed the function name to a single char :P, used just `n` instead of `n>0` in the ternary to check for positivity of the number `n`, used the out param `r` to store the return value.
[Attempt This Online!](https://ato.pxeger.com/run?1=XVDdToMwFL7nKU4WSdq1zI4BY-L0QSYxyKxpomUpxRvCe5h4w4V7qL2NB9oYtck53-l3_s_nuX58qevx8lE3urWg9CSnzraHEvbQA1unQnBgcZqhXk92FM96IwQMReDy5GtTWWg6-ysVQKxEFqd8tuJc5Ls832aJSJJdkjjWO7N_z7HbFBucOyuj_HIlieaG9mZP9D2OcRNpek3QWAlWPbVEU1oMPvZr2uKtUpq8N-pIoQ8AZGOAzNvhbKJAuIUUgTHnB7_C0jzbwv2JP4QqOSBLHX0yWEWSRXiE6A5CCYdQlg96weFvOP-5hirn1AEF-c5o7B_4WcfR4Tc)
---
```
float golf(n){return(n>0?100:-n)/(100.0+abs(n));}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=XVDdaoMwFL7PUxwKQkTtjk5tWrfuQToZzi5FaJOicTcie43BbrzpQ_VtdjS2jAVy_r-c78vPpXw7lOVw_S61agxUarzn1jS7HJ6hAy9MEH3woiQlG45xEE32ERH6jFmcPOrCgG7NHygALjGNEn-KIoFiLcQqjTGO13Fsq3Mz_XdsdZXQgktrZCCuod1w0EfJldvVH6atFVdbfCFOm0C5D5yCJXrFe0MDbtbPwK9R0qmoFP_U1d6FjkldA5-EEk3MyD1BQs7zxu65ppbkC2cPwRYcCTtH5q9q4d_-pcp9S-Oeu_5dOSUZ65mlR4-zmcYwWP8L)
This is my low effort attempt at golfing this problem using C. Need help!
]