[Question]
  [
There was a discussion going on in TNB once about the best temperature scale, and we agreed on something: Take the average of all four main temperature scales! That is, [Celsius](https://en.wikipedia.org/wiki/Celsius), [Kelvin](https://en.wikipedia.org/wiki/Kelvin), [Fahrenheit](https://en.wikipedia.org/wiki/Fahrenheit), and [Rankine](https://en.wikipedia.org/wiki/Rankine_scale) (Sorry Réaumur).
So, now the issue is, most people don't use this system. So, I need a program to convert back from this average!
# Challenge
Given the average of the Celsius, Fahrenheit, Kelvin, and Rankine representations of a certain temperature, output the individual standard representations, in any prespecified and consistent order. It turns out that this is possible, based on my whiteboard calculations. Input will be a single floating-point value in whatever range your language can handle, and output will be four floating-point values in any reasonable format. You can restrict the input to force the output to be in the range of your language, but you must be able to support down to Absolute Zero (thus, you need to be able to handle negative numbers).
# Test Cases
```
input -> (Celsius, Fahrenheit, Kelvin, Rankine)
100 -> (-70.86071428571424, -95.54928571428565, 202.28928571428574, 364.12071428571437)
20 -> (-128.0035714285714, -198.4064285714286, 145.14642857142857, 261.2635714285714)
-10 -> (-149.43214285714282, -236.97785714285715, 123.71785714285716, 222.69214285714287)
10000 -> (7000.567857142858, 12633.022142857144, 7273.717857142858, 13092.692142857144)
```
These values were generated with [Uriel's Python program](https://codegolf.stackexchange.com/questions/117462/un-average-temperatures/117464#117464), and I verified that they were correct.
  
[Answer]
## JavaScript (ES6), 49 bytes
```
f=
a=>[a=(a-199.205)/1.4,a+=273.15,a*=1.8,a-=459.67]
```
```
<input oninput=f(this.value).map(function(x,i){o.rows[i].cells[1].textContent=x})>
<table id=o>
<tr><th>Celsius:</th><td></td></tr>
<tr><th>Kelvin:</th><td></td></tr>
<tr><th>Rankine:</th><td></td></tr>
<tr><th>Fahrenheit:</th><td></td></tr>
</table>
```
[Answer]
# Python, 63 bytes
```
def f(a):x=(a+183.205)*5/7;m=x*9/5;return x-273.15,m-459.67,x,m
```
`a` is the average, returns a tuple of the results as `(celsius, fahrenheit, kelvin, rankine)`
**Math involved:**
```
kelvin = x
celsius = x - 273.15
fahrenheit = x * 9/5 - 459.67
rankine = x * 9/5
a = (x + x - 273.15 + x * 9/5 - 459.67 + x * 9/5) / 4 = x * 7/5 - 183.205
x = (a + 183.205) * 5/7
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), ~~40~~ ~~37~~ 36 bytes
```
~~-BJ+c36641 280c\*5Q7 273.15-B\*J1.8 459.67~~
~~-BJc+916.025\*5Q7 273.15-B\*J1.8 459.67~~
-BJc+916.025*5Q7 273.15-B*1.8J459.67
```
[Try it online!](http://pyth.herokuapp.com/?code=-BJc%2B916.025%2a5Q7+273.15-B%2a1.8J459.67&input=100&debug=0)
### Specs
* Input: `100`
* Output: `[Kelvin, Celcius]\n[Rankine, Fahrenheit]`
### Math
```
kelvin = (average*5+916.025)/7
```
[Answer]
# Dyalog APL, ~~46~~ 40 bytes
*6 bytes saved thanks to @Adám*
```
273.15 459.67 0 0-⍨4⍴63 35÷⍨45×183.205+⊢
```
[Try it online!](http://tryapl.org/?a=f%u2190273.15%20459.67%200%200-%u23684%u237463%2035%F7%u236845%D7183.205+%u22A2%20%u22C4%20f%A8%20%u236A100%2020%20%AF10%20%AF200%2010000&run)
Anonymous monad, uses the Dyalog Classic character set.
[Answer]
# PHP, 62 Bytes
Order Kelvin , Celsius , Rankine , Fahrenheit
```
print_r([$t=($argn+183.205)/1.4,$t-273.15,$t*=1.8,$t-459.67]);
```
[Online Version](http://sandbox.onlinephpfunctions.com/code/42403661677c964f30a4332b964820d6828ca937)
## PHP, 64 Bytes
Order Kelvin , Rankine , Fahrenheit , Celsius
```
print_r([$k=($argn+183.205)/1.4,$r=1.8*$k,$r-459.67,$k-273.15]);
```
[Online Version](http://sandbox.onlinephpfunctions.com/code/80b1bf69b00ae400d0440039ce8be0750b67ae0c)
[Answer]
# dc, 37 ~~38~~ bytes
*[Edit 1: Added third form, per Neil's comment]*
These *[first two]* are both the same length :( The first one produces Fahrenheit, Celsius, Kelvin, Rankine (top to bottom on the stack), and the second one produces Fahrenheit, Rankine, Celsius, Kelvin.
```
9k?183.205+1.4/d1.8*rd273.15-d1.8*32+f
9k?183.205+1.4/d273.15-rd1.8*d459.67-f
9k?199.205-1.4/d273.15+d1.8*d459.67-f
```
Example outputs (`dc` uses \_ to signal negative numbers on input):
*[from first two forms; see edit below for third form.]*
```
20
-198.406428572
-128.003571429
145.146428571
261.263571427
20
-198.406428573
261.263571427
145.146428571
-128.003571429
_10
-236.977857144
-149.432142858
123.717857142
222.692142855
_10
-236.977857145
222.692142855
123.717857142
-149.432142858
```
# How it works
```
9k?183.205+1.4/d1.8*rd273.15-d1.8*32+f
```
`9k` sets 9-place arithmetic.  
`?` reads input from stdin, leaving it at top of stack (TOS).  
`183.205+` adds 183.205 to TOS  
`1.4/` divides TOS by 1.4 or 7/5, giving degrees Kelvin.  
`d` duplicates TOS. (Ie, duplicates degrees Kelvin)  
`1.8*r` computes Rankine from Kelvin, then reverses top two of stack.  
`d273.15-` duplicates TOS and subtracts 273.15 to get degrees Celsius.  
`d1.8*32+` duplicates TOS, multiplies by 9/5, and adds 32, for Fahrenheit.  
`f` prints contents of stack.
---
*Edit 1, continued:*
```
9k?199.205-1.4/d273.15+d1.8*d459.67-f
```
This form, suggested by Neil, begins by computing Celsius instead of Kelvin. This saves a rotate (an `r`) when computing Rankin from Kelvin.
It computes Celsius = (Average - 199.205)\*5/7 via `199.205-1.4/`, adds 273.15 to get Kelvin, multiplies by 1.8 to get Rankin, and subtracts 459.67 to get Fahrenheit. For example:
```
20
-198.406428571
261.263571429
145.146428572
-128.003571428
```
[Answer]
# [CJam](https://sourceforge.net/p/cjam), 38 bytes
```
rd5*916.025+7/_p_273.15-p1.8*_p459.67-
```
Kelvins = `(5*input+916.025)/7`
Outputs as
```
Kelvin
Celsius
Rankine
Fahrenheit
```
[Try it online!](https://tio.run/nexus/cjam#@1@UYqplaWimZ2Bkqm2uH18Qb2RurGdoqltgqGehFV9gYmqpZ2au@/@/oQEQAAA "CJam – TIO Nexus")
[Answer]
# [Whispers v2](https://github.com/cairdcoinheringaahing/Whispers), 168 bytes
```
> Input
> 5
> 7
> 183.205
>> 2÷3
>> 1+4
>> 6⋅5
>> 7-11
>> 7⋅12
>> 9-13
> 273.15
> 1.8
> 459.67
>> Output 7
>> Output 8
>> Output 9
>> Output 10
>> Then 14 15 16 17
```
[Try it online!](https://tio.run/##TY09DsIwDIV3TuEdNcrLn5MlOxMLV6hUlqqirTgBEwfiANyEiwS7Uwb7fe/Zsp/TfV3Gx@paq3SZl307VYpSLIXsjbPiKrnvx6viHFTS7/06ch6AQyWAUyoDZJMcewM9BJOlh1hMYp1f902@UM@549IxrJrbNM6EQIiERODWYO0f "Whispers v2 – Try It Online")
Outputs as `Kelvin\nCelsius\nRankine\nFahrenheit`
[Answer]
**Python 3, 67 bytes**
```
c=(5*float(input())-996.025)/7;t=[c,c*1.8+32,c+273.15,c*1.8+491.67]
```
This code does some algebra to get the temperature in Celcius, then I convert it to the other temperature units. The temperatures are stored in the list `t`.
]