Convert numbers between 0 and infinity to numbers between 0.0 and 1.0












3












$begingroup$


Can we arrange all numbers x; such that x lies between 0 and Infinity, between 0 and 1? The scale does not have to be linear, but for any a and b in x, where a <= b, then a' and b', the equivalent numbers on the new scale must also be such that: a' <= b'.



I am really curious about this as I need it for a ratings system.



Thanks!










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    "The scale does not have to be linear" how fortunate!
    $endgroup$
    – mdup
    Feb 17 at 19:44










  • $begingroup$
    @mdup, lol!, yeah... I have very mild requirements.... until something changes lol
    $endgroup$
    – gbenroscience
    Feb 17 at 22:12


















3












$begingroup$


Can we arrange all numbers x; such that x lies between 0 and Infinity, between 0 and 1? The scale does not have to be linear, but for any a and b in x, where a <= b, then a' and b', the equivalent numbers on the new scale must also be such that: a' <= b'.



I am really curious about this as I need it for a ratings system.



Thanks!










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    "The scale does not have to be linear" how fortunate!
    $endgroup$
    – mdup
    Feb 17 at 19:44










  • $begingroup$
    @mdup, lol!, yeah... I have very mild requirements.... until something changes lol
    $endgroup$
    – gbenroscience
    Feb 17 at 22:12
















3












3








3





$begingroup$


Can we arrange all numbers x; such that x lies between 0 and Infinity, between 0 and 1? The scale does not have to be linear, but for any a and b in x, where a <= b, then a' and b', the equivalent numbers on the new scale must also be such that: a' <= b'.



I am really curious about this as I need it for a ratings system.



Thanks!










share|cite|improve this question











$endgroup$




Can we arrange all numbers x; such that x lies between 0 and Infinity, between 0 and 1? The scale does not have to be linear, but for any a and b in x, where a <= b, then a' and b', the equivalent numbers on the new scale must also be such that: a' <= b'.



I am really curious about this as I need it for a ratings system.



Thanks!







real-numbers number-line






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Feb 17 at 19:32









J. W. Tanner

2,4331117




2,4331117










asked Feb 17 at 11:27









gbenrosciencegbenroscience

356




356








  • 1




    $begingroup$
    "The scale does not have to be linear" how fortunate!
    $endgroup$
    – mdup
    Feb 17 at 19:44










  • $begingroup$
    @mdup, lol!, yeah... I have very mild requirements.... until something changes lol
    $endgroup$
    – gbenroscience
    Feb 17 at 22:12
















  • 1




    $begingroup$
    "The scale does not have to be linear" how fortunate!
    $endgroup$
    – mdup
    Feb 17 at 19:44










  • $begingroup$
    @mdup, lol!, yeah... I have very mild requirements.... until something changes lol
    $endgroup$
    – gbenroscience
    Feb 17 at 22:12










1




1




$begingroup$
"The scale does not have to be linear" how fortunate!
$endgroup$
– mdup
Feb 17 at 19:44




$begingroup$
"The scale does not have to be linear" how fortunate!
$endgroup$
– mdup
Feb 17 at 19:44












$begingroup$
@mdup, lol!, yeah... I have very mild requirements.... until something changes lol
$endgroup$
– gbenroscience
Feb 17 at 22:12






$begingroup$
@mdup, lol!, yeah... I have very mild requirements.... until something changes lol
$endgroup$
– gbenroscience
Feb 17 at 22:12












3 Answers
3






active

oldest

votes


















5












$begingroup$

$exp$ is a great tool, but there's also
$$
x mapsto frac{x^2}{1+x^2}
$$

which may be slightly easier to work with in some situations.



As @Servaes points out, you can also use
$$
x mapsto frac{x}{1+x}
$$

because you're working on the nonnegative reals rather than all reals.



And a personal favorite of mine is
$$
x mapsto frac{2}{pi} arctan(x).
$$






share|cite|improve this answer











$endgroup$









  • 2




    $begingroup$
    And in fact there is no need for the squares as the function is needed on the nonnegative reals only.
    $endgroup$
    – Servaes
    Feb 17 at 11:37






  • 1




    $begingroup$
    Good point. Edited.
    $endgroup$
    – John Hughes
    Feb 17 at 11:41



















4












$begingroup$

There are many options, one example is the function $f(x)=e^{-x}$. It maps the domain $(0,infty)$ onto the range $(0,1)$, though it reverses the ordering. That is, if $x<y$ then $f(x)>f(y)$. This is of course easily fixed by taking
$$g(x)=1-f(x)=1-e^{-x},$$
instead.






share|cite|improve this answer











$endgroup$









  • 1




    $begingroup$
    $6$ seconds before me!
    $endgroup$
    – Peter Foreman
    Feb 17 at 11:31










  • $begingroup$
    @PeterForeman Either this is a rather canonical answer, or you are very fast at paraphrasing.
    $endgroup$
    – Servaes
    Feb 17 at 11:32






  • 1




    $begingroup$
    Are you sure this satisfies the second requirement?
    $endgroup$
    – Keatinge
    Feb 17 at 11:33






  • 2




    $begingroup$
    Given that if $aleq b$ then $a'leq b'$ I think $1-e^{-x}$ should be what OP is looking for.
    $endgroup$
    – Infiaria
    Feb 17 at 11:34






  • 1




    $begingroup$
    Wow, I . am impressed with the dexterity and eagerness here. Thanks so much for helping out! I have to accept the other answer by @John Hughes, though. Because I need the answers not to converge too quickly towards 1. Thanks all the same!
    $endgroup$
    – gbenroscience
    Feb 17 at 11:56



















2












$begingroup$

The expression you are looking for is a one-to-one mapping from positive reals into $[0,1]$. Consider the exponential mapping $f_k(x) = exp(- (x^k))$. Other people suggested $f_2$. There exist other mappings.






share|cite|improve this answer











$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3116137%2fconvert-numbers-between-0-and-infinity-to-numbers-between-0-0-and-1-0%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5












    $begingroup$

    $exp$ is a great tool, but there's also
    $$
    x mapsto frac{x^2}{1+x^2}
    $$

    which may be slightly easier to work with in some situations.



    As @Servaes points out, you can also use
    $$
    x mapsto frac{x}{1+x}
    $$

    because you're working on the nonnegative reals rather than all reals.



    And a personal favorite of mine is
    $$
    x mapsto frac{2}{pi} arctan(x).
    $$






    share|cite|improve this answer











    $endgroup$









    • 2




      $begingroup$
      And in fact there is no need for the squares as the function is needed on the nonnegative reals only.
      $endgroup$
      – Servaes
      Feb 17 at 11:37






    • 1




      $begingroup$
      Good point. Edited.
      $endgroup$
      – John Hughes
      Feb 17 at 11:41
















    5












    $begingroup$

    $exp$ is a great tool, but there's also
    $$
    x mapsto frac{x^2}{1+x^2}
    $$

    which may be slightly easier to work with in some situations.



    As @Servaes points out, you can also use
    $$
    x mapsto frac{x}{1+x}
    $$

    because you're working on the nonnegative reals rather than all reals.



    And a personal favorite of mine is
    $$
    x mapsto frac{2}{pi} arctan(x).
    $$






    share|cite|improve this answer











    $endgroup$









    • 2




      $begingroup$
      And in fact there is no need for the squares as the function is needed on the nonnegative reals only.
      $endgroup$
      – Servaes
      Feb 17 at 11:37






    • 1




      $begingroup$
      Good point. Edited.
      $endgroup$
      – John Hughes
      Feb 17 at 11:41














    5












    5








    5





    $begingroup$

    $exp$ is a great tool, but there's also
    $$
    x mapsto frac{x^2}{1+x^2}
    $$

    which may be slightly easier to work with in some situations.



    As @Servaes points out, you can also use
    $$
    x mapsto frac{x}{1+x}
    $$

    because you're working on the nonnegative reals rather than all reals.



    And a personal favorite of mine is
    $$
    x mapsto frac{2}{pi} arctan(x).
    $$






    share|cite|improve this answer











    $endgroup$



    $exp$ is a great tool, but there's also
    $$
    x mapsto frac{x^2}{1+x^2}
    $$

    which may be slightly easier to work with in some situations.



    As @Servaes points out, you can also use
    $$
    x mapsto frac{x}{1+x}
    $$

    because you're working on the nonnegative reals rather than all reals.



    And a personal favorite of mine is
    $$
    x mapsto frac{2}{pi} arctan(x).
    $$







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Feb 17 at 11:39

























    answered Feb 17 at 11:36









    John HughesJohn Hughes

    64.3k24191




    64.3k24191








    • 2




      $begingroup$
      And in fact there is no need for the squares as the function is needed on the nonnegative reals only.
      $endgroup$
      – Servaes
      Feb 17 at 11:37






    • 1




      $begingroup$
      Good point. Edited.
      $endgroup$
      – John Hughes
      Feb 17 at 11:41














    • 2




      $begingroup$
      And in fact there is no need for the squares as the function is needed on the nonnegative reals only.
      $endgroup$
      – Servaes
      Feb 17 at 11:37






    • 1




      $begingroup$
      Good point. Edited.
      $endgroup$
      – John Hughes
      Feb 17 at 11:41








    2




    2




    $begingroup$
    And in fact there is no need for the squares as the function is needed on the nonnegative reals only.
    $endgroup$
    – Servaes
    Feb 17 at 11:37




    $begingroup$
    And in fact there is no need for the squares as the function is needed on the nonnegative reals only.
    $endgroup$
    – Servaes
    Feb 17 at 11:37




    1




    1




    $begingroup$
    Good point. Edited.
    $endgroup$
    – John Hughes
    Feb 17 at 11:41




    $begingroup$
    Good point. Edited.
    $endgroup$
    – John Hughes
    Feb 17 at 11:41











    4












    $begingroup$

    There are many options, one example is the function $f(x)=e^{-x}$. It maps the domain $(0,infty)$ onto the range $(0,1)$, though it reverses the ordering. That is, if $x<y$ then $f(x)>f(y)$. This is of course easily fixed by taking
    $$g(x)=1-f(x)=1-e^{-x},$$
    instead.






    share|cite|improve this answer











    $endgroup$









    • 1




      $begingroup$
      $6$ seconds before me!
      $endgroup$
      – Peter Foreman
      Feb 17 at 11:31










    • $begingroup$
      @PeterForeman Either this is a rather canonical answer, or you are very fast at paraphrasing.
      $endgroup$
      – Servaes
      Feb 17 at 11:32






    • 1




      $begingroup$
      Are you sure this satisfies the second requirement?
      $endgroup$
      – Keatinge
      Feb 17 at 11:33






    • 2




      $begingroup$
      Given that if $aleq b$ then $a'leq b'$ I think $1-e^{-x}$ should be what OP is looking for.
      $endgroup$
      – Infiaria
      Feb 17 at 11:34






    • 1




      $begingroup$
      Wow, I . am impressed with the dexterity and eagerness here. Thanks so much for helping out! I have to accept the other answer by @John Hughes, though. Because I need the answers not to converge too quickly towards 1. Thanks all the same!
      $endgroup$
      – gbenroscience
      Feb 17 at 11:56
















    4












    $begingroup$

    There are many options, one example is the function $f(x)=e^{-x}$. It maps the domain $(0,infty)$ onto the range $(0,1)$, though it reverses the ordering. That is, if $x<y$ then $f(x)>f(y)$. This is of course easily fixed by taking
    $$g(x)=1-f(x)=1-e^{-x},$$
    instead.






    share|cite|improve this answer











    $endgroup$









    • 1




      $begingroup$
      $6$ seconds before me!
      $endgroup$
      – Peter Foreman
      Feb 17 at 11:31










    • $begingroup$
      @PeterForeman Either this is a rather canonical answer, or you are very fast at paraphrasing.
      $endgroup$
      – Servaes
      Feb 17 at 11:32






    • 1




      $begingroup$
      Are you sure this satisfies the second requirement?
      $endgroup$
      – Keatinge
      Feb 17 at 11:33






    • 2




      $begingroup$
      Given that if $aleq b$ then $a'leq b'$ I think $1-e^{-x}$ should be what OP is looking for.
      $endgroup$
      – Infiaria
      Feb 17 at 11:34






    • 1




      $begingroup$
      Wow, I . am impressed with the dexterity and eagerness here. Thanks so much for helping out! I have to accept the other answer by @John Hughes, though. Because I need the answers not to converge too quickly towards 1. Thanks all the same!
      $endgroup$
      – gbenroscience
      Feb 17 at 11:56














    4












    4








    4





    $begingroup$

    There are many options, one example is the function $f(x)=e^{-x}$. It maps the domain $(0,infty)$ onto the range $(0,1)$, though it reverses the ordering. That is, if $x<y$ then $f(x)>f(y)$. This is of course easily fixed by taking
    $$g(x)=1-f(x)=1-e^{-x},$$
    instead.






    share|cite|improve this answer











    $endgroup$



    There are many options, one example is the function $f(x)=e^{-x}$. It maps the domain $(0,infty)$ onto the range $(0,1)$, though it reverses the ordering. That is, if $x<y$ then $f(x)>f(y)$. This is of course easily fixed by taking
    $$g(x)=1-f(x)=1-e^{-x},$$
    instead.







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited Feb 17 at 19:32









    J. W. Tanner

    2,4331117




    2,4331117










    answered Feb 17 at 11:31









    ServaesServaes

    25.8k33996




    25.8k33996








    • 1




      $begingroup$
      $6$ seconds before me!
      $endgroup$
      – Peter Foreman
      Feb 17 at 11:31










    • $begingroup$
      @PeterForeman Either this is a rather canonical answer, or you are very fast at paraphrasing.
      $endgroup$
      – Servaes
      Feb 17 at 11:32






    • 1




      $begingroup$
      Are you sure this satisfies the second requirement?
      $endgroup$
      – Keatinge
      Feb 17 at 11:33






    • 2




      $begingroup$
      Given that if $aleq b$ then $a'leq b'$ I think $1-e^{-x}$ should be what OP is looking for.
      $endgroup$
      – Infiaria
      Feb 17 at 11:34






    • 1




      $begingroup$
      Wow, I . am impressed with the dexterity and eagerness here. Thanks so much for helping out! I have to accept the other answer by @John Hughes, though. Because I need the answers not to converge too quickly towards 1. Thanks all the same!
      $endgroup$
      – gbenroscience
      Feb 17 at 11:56














    • 1




      $begingroup$
      $6$ seconds before me!
      $endgroup$
      – Peter Foreman
      Feb 17 at 11:31










    • $begingroup$
      @PeterForeman Either this is a rather canonical answer, or you are very fast at paraphrasing.
      $endgroup$
      – Servaes
      Feb 17 at 11:32






    • 1




      $begingroup$
      Are you sure this satisfies the second requirement?
      $endgroup$
      – Keatinge
      Feb 17 at 11:33






    • 2




      $begingroup$
      Given that if $aleq b$ then $a'leq b'$ I think $1-e^{-x}$ should be what OP is looking for.
      $endgroup$
      – Infiaria
      Feb 17 at 11:34






    • 1




      $begingroup$
      Wow, I . am impressed with the dexterity and eagerness here. Thanks so much for helping out! I have to accept the other answer by @John Hughes, though. Because I need the answers not to converge too quickly towards 1. Thanks all the same!
      $endgroup$
      – gbenroscience
      Feb 17 at 11:56








    1




    1




    $begingroup$
    $6$ seconds before me!
    $endgroup$
    – Peter Foreman
    Feb 17 at 11:31




    $begingroup$
    $6$ seconds before me!
    $endgroup$
    – Peter Foreman
    Feb 17 at 11:31












    $begingroup$
    @PeterForeman Either this is a rather canonical answer, or you are very fast at paraphrasing.
    $endgroup$
    – Servaes
    Feb 17 at 11:32




    $begingroup$
    @PeterForeman Either this is a rather canonical answer, or you are very fast at paraphrasing.
    $endgroup$
    – Servaes
    Feb 17 at 11:32




    1




    1




    $begingroup$
    Are you sure this satisfies the second requirement?
    $endgroup$
    – Keatinge
    Feb 17 at 11:33




    $begingroup$
    Are you sure this satisfies the second requirement?
    $endgroup$
    – Keatinge
    Feb 17 at 11:33




    2




    2




    $begingroup$
    Given that if $aleq b$ then $a'leq b'$ I think $1-e^{-x}$ should be what OP is looking for.
    $endgroup$
    – Infiaria
    Feb 17 at 11:34




    $begingroup$
    Given that if $aleq b$ then $a'leq b'$ I think $1-e^{-x}$ should be what OP is looking for.
    $endgroup$
    – Infiaria
    Feb 17 at 11:34




    1




    1




    $begingroup$
    Wow, I . am impressed with the dexterity and eagerness here. Thanks so much for helping out! I have to accept the other answer by @John Hughes, though. Because I need the answers not to converge too quickly towards 1. Thanks all the same!
    $endgroup$
    – gbenroscience
    Feb 17 at 11:56




    $begingroup$
    Wow, I . am impressed with the dexterity and eagerness here. Thanks so much for helping out! I have to accept the other answer by @John Hughes, though. Because I need the answers not to converge too quickly towards 1. Thanks all the same!
    $endgroup$
    – gbenroscience
    Feb 17 at 11:56











    2












    $begingroup$

    The expression you are looking for is a one-to-one mapping from positive reals into $[0,1]$. Consider the exponential mapping $f_k(x) = exp(- (x^k))$. Other people suggested $f_2$. There exist other mappings.






    share|cite|improve this answer











    $endgroup$


















      2












      $begingroup$

      The expression you are looking for is a one-to-one mapping from positive reals into $[0,1]$. Consider the exponential mapping $f_k(x) = exp(- (x^k))$. Other people suggested $f_2$. There exist other mappings.






      share|cite|improve this answer











      $endgroup$
















        2












        2








        2





        $begingroup$

        The expression you are looking for is a one-to-one mapping from positive reals into $[0,1]$. Consider the exponential mapping $f_k(x) = exp(- (x^k))$. Other people suggested $f_2$. There exist other mappings.






        share|cite|improve this answer











        $endgroup$



        The expression you are looking for is a one-to-one mapping from positive reals into $[0,1]$. Consider the exponential mapping $f_k(x) = exp(- (x^k))$. Other people suggested $f_2$. There exist other mappings.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Feb 17 at 19:31









        J. W. Tanner

        2,4331117




        2,4331117










        answered Feb 17 at 11:35









        PackSciencesPackSciences

        1,24217




        1,24217






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3116137%2fconvert-numbers-between-0-and-infinity-to-numbers-between-0-0-and-1-0%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents