@@ -303,6 +303,82 @@ def rankine_to_kelvin(rankine: float, ndigits: int = 2) -> float:
303303 return round ((float (rankine ) * 5 / 9 ), ndigits )
304304
305305
306+ def reaumur_to_kelvin (reaumur : float , ndigits : int = 2 ) -> float :
307+ """
308+ Convert a given value from reaumur to Kelvin and round it to 2 decimal places.
309+ Reference:- http://www.csgnetwork.com/temp2conv.html
310+
311+ >>> reaumur_to_kelvin(0)
312+ 273.15
313+ >>> reaumur_to_kelvin(20.0)
314+ 298.15
315+ >>> reaumur_to_kelvin(40)
316+ 323.15
317+ >>> reaumur_to_kelvin("reaumur")
318+ Traceback (most recent call last):
319+ ...
320+ ValueError: could not convert string to float: 'reaumur'
321+ """
322+ return round ((float (reaumur ) * 1.25 + 273.15 ), ndigits )
323+
324+
325+ def reaumur_to_fahrenheit (reaumur : float , ndigits : int = 2 ) -> float :
326+ """
327+ Convert a given value from reaumur to fahrenheit and round it to 2 decimal places.
328+ Reference:- http://www.csgnetwork.com/temp2conv.html
329+
330+ >>> reaumur_to_fahrenheit(0)
331+ 32.0
332+ >>> reaumur_to_fahrenheit(20.0)
333+ 77.0
334+ >>> reaumur_to_fahrenheit(40)
335+ 122.0
336+ >>> reaumur_to_fahrenheit("reaumur")
337+ Traceback (most recent call last):
338+ ...
339+ ValueError: could not convert string to float: 'reaumur'
340+ """
341+ return round ((float (reaumur ) * 2.25 + 32 ), ndigits )
342+
343+
344+ def reaumur_to_celsius (reaumur : float , ndigits : int = 2 ) -> float :
345+ """
346+ Convert a given value from reaumur to celsius and round it to 2 decimal places.
347+ Reference:- http://www.csgnetwork.com/temp2conv.html
348+
349+ >>> reaumur_to_celsius(0)
350+ 0.0
351+ >>> reaumur_to_celsius(20.0)
352+ 25.0
353+ >>> reaumur_to_celsius(40)
354+ 50.0
355+ >>> reaumur_to_celsius("reaumur")
356+ Traceback (most recent call last):
357+ ...
358+ ValueError: could not convert string to float: 'reaumur'
359+ """
360+ return round ((float (reaumur ) * 1.25 ), ndigits )
361+
362+
363+ def reaumur_to_rankine (reaumur : float , ndigits : int = 2 ) -> float :
364+ """
365+ Convert a given value from reaumur to rankine and round it to 2 decimal places.
366+ Reference:- http://www.csgnetwork.com/temp2conv.html
367+
368+ >>> reaumur_to_rankine(0)
369+ 491.67
370+ >>> reaumur_to_rankine(20.0)
371+ 536.67
372+ >>> reaumur_to_rankine(40)
373+ 581.67
374+ >>> reaumur_to_rankine("reaumur")
375+ Traceback (most recent call last):
376+ ...
377+ ValueError: could not convert string to float: 'reaumur'
378+ """
379+ return round ((float (reaumur ) * 2.25 + 32 + 459.67 ), ndigits )
380+
381+
306382if __name__ == "__main__" :
307383
308384 import doctest
0 commit comments