[Question]
  [
## Context
So the Dutch "Ministerie van Binnenlandse Zaken en Koninkrijksrelaties" (NL) - "Ministry of the Interior and Kingdom Relations" (EN) recently released the source code of their digid-app.
They have some goofy code in there, which led to [mockery and memes on reddit](https://www.reddit.com/r/ProgrammerHumor/comments/10dh6x1/very_efficient_code/)
Source code of the offending method can be found [here](https://github.com/MinBZK/woo-besluit-broncode-digid-app/blob/ad2737c4a039d5ca76633b81e9d4f3f9370549e4/Source/DigiD.iOS/Services/NFCService.cs#L182). Here's a copy:
```
private static string GetPercentageRounds(double percentage)
{
    if (percentage == 0)
        return "‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™";
    if (percentage > 0.0 && percentage <= 0.1)
        return "üîµ‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™";
    if (percentage > 0.1 && percentage <= 0.2)
        return "üîµüîµ‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™";
    if (percentage > 0.2 && percentage <= 0.3)
        return "üîµüîµüîµ‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™";
    if (percentage > 0.3 && percentage <= 0.4)
        return "üîµüîµüîµüîµ‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™";
    if (percentage > 0.4 && percentage <= 0.5)
        return "üîµüîµüîµüîµüîµ‚ö™‚ö™‚ö™‚ö™‚ö™";
    if (percentage > 0.5 && percentage <= 0.6)
        return "üîµüîµüîµüîµüîµüîµ‚ö™‚ö™‚ö™‚ö™";
    if (percentage > 0.6 && percentage <= 0.7)
        return "üîµüîµüîµüîµüîµüîµüîµ‚ö™‚ö™‚ö™";
    if (percentage > 0.7 && percentage <= 0.8)
        return "üîµüîµüîµüîµüîµüîµüîµüîµ‚ö™‚ö™";
    if (percentage > 0.8 && percentage <= 0.9)
        return "üîµüîµüîµüîµüîµüîµüîµüîµüîµ‚ö™";
    return "üîµüîµüîµüîµüîµüîµüîµüîµüîµüîµ";
}
```
## Try it online:
<https://dotnetfiddle.net/aMEUAM>
## Challenge
Write code in any language as short as possible to replicate the above function
## Rule clarification
* You must exactly match the input and output of the original function. Substituting the ball characters with something else is not allowed.
* You must stick to the functions original boundaries. Meaning if the input is something unexpected like -1 or 42 you must still return the same result as the original function.
  
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 53 bytes
```
f=(n,i=10)=>i?f(n,--i)+(n>=0&n<=i/10?"‚ö™":"üîµ"):''
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9mC0QaeTqZtoYGmrZ2mfZpQI6ubqamtkaena2BWp6Nbaa@oYG90qNZq5SslD7Mn7JVSdNKXf1/cn5ecX5Oql5OfrpGmoaukaYmF6qQgZ4JFjEzCyyClpYYgn6JfkCx/wA "JavaScript (Node.js) ‚Äì Try It Online")
Need `n>=0` to handle NaN
[Answer]
# Scratch, ~~172 166~~ 142 bytes
This program [outputs to a global variable `o` which is automatically displayed](https://codegolf.meta.stackexchange.com/a/25520/108687) and assumes that [the `i` variable is initialized at 0](https://codegolf.meta.stackexchange.com/a/20836/108687) and that [the procedure will only be run once](https://codegolf.meta.stackexchange.com/a/20839/108687)1.
![](https://i.stack.imgur.com/wbywD.png)
```
define(n
set[o v]to(
set[a v]to[üîµ
repeat(10
change[i v]by(1
if<<(i)>((n)*(10))>and<(-.01)<(n)>>then
set[a v]to[‚ö™
end
set[o v]to(join(o)(a
```
[Try it on Scratch!](https://scratch.mit.edu/projects/790853978/)
## Scratch, 116 bytes
This solution is technically invalid because it replaces the emojis with the characters "x" and "\_". Unfortunately, this method cannot use emojis due to the way strings seem to work in Scratch, as getting the character at a certain index of a string doesn't work for unicode chars. I just wanted to add this since I think it's really cool.
```
define(n
set[o v]to(
repeat(10
change[i v]by(1
set[o v]to(join(o)(letter((1)+<<(i)>((n)*(10))>and<(-.01)<(n)>>)of[x_
```
[![enter image description here](https://i.stack.imgur.com/f9rVT.png)](https://i.stack.imgur.com/f9rVT.png)
[Try it on Scratch!](https://scratch.mit.edu/projects/824072957)
1For testing purposes, the procedure is run many times in the scratch link, so `o` is pushed to an array of test results at the end of each call.
[Answer]
# [Type System](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html) (TypeScript 4.9.4) - ~~243~~ 188 Bytes
Now they can validate their function with type safety!
* 56 Bytes thanks to **@ASCII-only**
* 8 Bytes thanks to **@ASCII-only**
* 114 Bytes only by **@ASCII-only** (without rounding)
```
type H<N,C=[],E={length:N},I='üîµ',L=C['length'],D=(`${N}`extends`${}e-${}`?'0.0':`${N}.0`)extends`0.${L}.0`|`0.${E['length']}${string}`?'‚ö™':I>=`${D}${L extends 9?'':H<N,[...C,0],C,D>}`
```
**Example usage**:
```
type ProgressBarZero = H<0>
type ProgressBarHalf = H<0.5>
type ProgressBarFull = H<1>
```
**(Original) Un-golfed Version**:
```
type LoadingBar<
  // N is a given number
  N extends number,
  // AddOne is used to add 1 to a number since we can't use addition [0]=1, [1]=2, [9]=10 etc.
  AddOne extends number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
  // Progress is calculated by checking if N is 0 if so return 0, otherwise cast to string and extract first digit after 0.(M)(R...) 
  // and cast to a number along with anything else after R. If R is an empty string '' then we can just return M since this means
  // it must be .(1)(0), .(2)(0), .(3)(0), etc. otherwise we use M to index V to add one.
  Progress = N extends 0 ? 0 : `${N}` extends `0.${infer M extends number}${infer R}` ? R extends '' ? M : AddOne[M] : 10,
  // ArrayCounter is an empty tuple which is used to count the iterations by tracking the length and appending 
  // elements recursively. 
  ArrayCounter extends any[] = [],
  // IsLoading is a cached flag to help denote when to display ‚ö™ or üîµ since we can only check for equality and not less than
  // or greater than we need to be able to keep track of when we are finished showing the percent loaded.
  IsLoading extends number = 1,
  // OutputString is our output string which we return at the end.
  OutputString extends string = '',
  // Length tracks the length of A each pass.
  Length extends number = ArrayCounter['length'],
  // Check if we have loaded all the üîµ elements by checking if our Length is equal to our Progress
  CheckIsLoaded extends number = (Progress extends Length ? 0 : 1) & IsLoading,
  // Symbol is which string to display and in order to check for "never" we need to compare [never] inside a tuple
  // otherwise it becomes distributive, also [never] = [0]
  Symbol extends string = [CheckIsLoaded] extends [0] ? '‚ö™' : 'üîµ'
> =
  // Here is the logic portion: if our Length is 10 we are finished and return the OutputString
  Length extends 10 ?  OutputString : 
  // Otherwise call recursively adding a new element to ArrayCounter each time to keep of the iterations
  // using EndLoading as the new IsLoading and concatinating Symbol to OutputString. Unfortunately,
  // we can only keep track of the tuple ArrayCounter'ss length and not strings. 
  LoadingBar<N, AddOne, Progress, [...ArrayCounter, Symbol], CheckIsLoaded, `${OutputString}${Symbol}`>
```
[Try it on the TypeScript playground!](https://www.typescriptlang.org/play?#code/C4TwDgpgBAEgPAOQDQGEC8BtAukgomgbwBsIA7Ac2AAsAuBAXyQEk0ByQXg3BWXdaQBk0UGViQrVWOACJoAFAAMAJAQayIAD2BkAJgGcFBehAC0i+rID8rAAwA6S6xp6Gt2QEo1G0jtk3Fves4Afb2tFXCERSipxekVtYAAnAEsKUwtAKrJ7JgA+ND0JGIJeKHctbSgATgt7eGQMa3qUJEscRoks0wAoDtBIKA04ywBGKDRYOBtLSampgCZBrI6AekWoVYA9M27waH7gSxmRsZsAFiGF5dWoDa3e3csAZkP4GxnzlfXNnp2IAeOn8es9zel2uXz6Pz2AFZ-idgR8bt8BgA2GHWSFwq6fbbggYAdlRuIxoOxdwAHKjSUSsbcIZZyqjylSETjgINLP9BrYmWDdoNhqNnlylu9MczeQcBXBDJzLNySRDBo9JWzJnKaXFBn9JZZVIMZkDhSDqYjWdDlWqTYMUcqIPdVYb4TyFfibeU3UygA)
[Answer]
## Excel formula, 58 ~~82~~ ~~104~~ bytes
> 
> -22 bytes thanks to @DominicvanEssen massive optimizations !
> 
> 
> -24 bytes thanks to @TaylorAlexRaine even more massive optimization !
> 
> 
> 
```
=LEFT(REPT("üîµ",-INT(-10*A1^(A1>=0)))&REPT("‚ö™",10),10)
```
Put the formula in any cell, and the parameter in the "A1" cell
---
Alternative solution : Creating a number of exactly 10 digits composed exclusively of 9's mapped as üîµ, and 8's mapped as ‚ö™ (**82 bytes**) :
```
=SUBSTITUTE(SUBSTITUTE(10^10-1-INT(10^INT(10*(1-A1^(A1>=0)))/9),9,"üîµ"),8,"‚ö™")
```
[Answer]
# [Java (JDK)](http://jdk.java.net/), 70 bytes
```
p->{var s="";for(int i=0;i<=9;)s+=p<0|p>i++*.1?"üîµ":"‚ö™";return s;}
```
[Try it online!](https://tio.run/##tdI9TsMwFAfwPad48pQQJU0GhtZNuUCZGBGDSZzKJXUs24lAJbdgYmFn50KcgBsER6QgVUlaUrDsxR8///X01qQk3jq5q0Vxm7EY4owoBZeEcdhaFgDjmsqUxBSWZgPMuNKS8RWkdpKbJxSEg81@1VxWmmhjLCGDqBbeYlsSCSpCCKe5tA0FLAowm0dT7Cg3EvPgUSyY65754QX6eHl6QzP0/vyKsKS6kBwUruoGb7O1fJmzBDYmof0V5foGiFwpp433oDTd@HmhfWFOdcbtzE9tLwz8wHGwuTGZAL0XNNY0gRk03x6zBnFjh/@Ff@fex02lBuYBsj/vaDPsjnmauUO76zoOPe8Pur9@5U6Pdzv@OWAPF@KUBgv7GuxP8J/2HY1XVlV/Ag "Java (JDK) ‚Äì Try It Online")
Don't hesitate to correct me, or ask me if this needs explanations!
I've really tried to do this challenge using alternative approaches, but it could never beat the good ol' for :(
---
*Here are my other attempts so far :*
Using the repeat available in Java 11+ (**78 bytes**) :
```
p->{int n=(int)(p<0|p>1?0:10-p*10);return"üîµ".repeat(10-n)+"‚ö™".repeat(n);}
```
  
Using a single inline Stream (**85 bytes**) :
```
p->"0123456789".chars().mapToObj(e->p<0|p*10>e-48?"üîµ":"‚ö™").reduce("",(a,b)->a+b)
```
  
Creating a 11-bits binary (the "1" to the left end is to protect the "ten zeroes" case) and mapping 1's as üîµ, and 0's as ‚ö™ (**109 bytes**) :
```
p->Integer.toString(2048-(1<<(int)(p<0|p>1?0:10-p*10)),2).substring(1).replace("0","‚ö™").replace("1","üîµ")
```
  
Creating a number of exactly 10 digits composed exclusively of 9's mapped as üîµ, and 8's mapped as ‚ö™ (**110 bytes**) :
```
p->(""+(long)(Math.pow(10,10)-Math.pow(10,(int)(p<0|p>1?0:10-p*10))/9)).replace("8","‚ö™").replace("9","üîµ")
```
  
Dirty recursion with optional parameter to match original function call signature (**113 bytes**) (fails if called without parameter) :
```
String f(Double... p){return p.length<2?f(p[0],10d):p[1]>0?f(p[0],--p[1])+(p[0]<0|p[0]>p[1]*.1?"üîµ":"‚ö™"):"";}
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 34 [bytes](https://en.wikipedia.org/wiki/UTF-8)
```
*A c mA         : multiply input by 10, round up to nearest whole n, max of this and 10. Store this result in U
<0?A:U          : If U is negative, 10, else U. Store in V
"üîµ"pV +"‚ö™"pVnA : Blue dot repeated V times, white dot repeated 10-V times
                : Implicit output
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=KkEgYyBtQQo8MD9BOlUKIlx1ZDgzZFx1ZGQzNSJwViArIlx1MjZhYSJwVm5B&input=LTAuMQ)
## [Japt](https://github.com/ETHproductions/japt) [`-E"üîµüîµüîµüîµüîµüîµüîµüîµüîµüîµ"`](https://codegolf.meta.stackexchange.com/a/14339/), 24 [bytes](https://en.wikipedia.org/wiki/UTF-8) + 13 = 37
`-E"s"` implicitly outputs "s" if an error is thrown, but is considered a cheating flag.
```
*A c            : Multiply input by 10, round up to whole number. Store in U
"üîµ"pU +"‚ö™"pUnA : Blue dot repeated U times, white dot repeated 10-V times
                : Implicit: Output that, or 10 dots if (0 < input < 1) is false
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LUUiXHVkODNkXHVkZDM1XHVkODNkXHVkZDM1XHVkODNkXHVkZDM1XHVkODNkXHVkZDM1XHVkODNkXHVkZDM1XHVkODNkXHVkZDM1XHVkODNkXHVkZDM1XHVkODNkXHVkZDM1XHVkODNkXHVkZDM1XHVkODNkXHVkZDM1Ig&code=KkEgYwoiXHVkODNkXHVkZDM1InBVICsiXHUyNmFhInBVbkE&input=LTAuMQ)
[Answer]
# C([gcc](https://gcc.gnu.org/)/[clang](https://clang.llvm.org/)) 86 characters (126 bytes)
returns a constant string of 30 bytes, same as the original and not a null terminated string as is common in C.
```
const char*p(double f){return"‚óè‚óè‚óè‚óè‚óè‚óè‚óè‚óè‚óè‚óè‚óã‚óã‚óã‚óã‚óã‚óã‚óã‚óã‚óã‚óã"+3*(int)(10.5-10*(f>1?1:f<0?1:f));}
```
```
const char*p(double f){
    return "‚óè‚óè‚óè‚óè‚óè‚óè‚óè‚óè‚óè‚óè‚óã‚óã‚óã‚óã‚óã‚óã‚óã‚óã‚óã‚óã" //the constant string we index into
    +3*                           //each character is three bytes
    (int)(                        //pointers must be integers
        10.5                      //constant offset handling centering and rounding
        -10*(                     //multiply up from the range 0->1 to 
            f>1?1:f<0?1:f         //correctly enforce the bounds
        )
    );
}
```
[Answer]
# [R](https://www.r-project.org/), 48 bytes
```
function(i)intToUtf8(9898+118411*(0:9<10*i|i<0))
```
[Try it online!](https://tio.run/##TctBCoAgEEDRvSdxjGImWoxht6gTJMZsFMJ23d0Wgrl7fPh38XKJ30p44pklRS0gMe/pyIG1ZcsDES9ERuNqHaGRVxwC1E@PBKoKGyb849Szs@3YcsMMqnw "R ‚Äì Try It Online")
[Answer]
# [PowerShell Core](https://github.com/PowerShell/PowerShell), 59 bytes
```
param($a)-join(0..9|%{("‚ö™","üîµ")[$a-lt0-or$_-lt$a*10]})
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNydFNzi9K/a@SZlv9vyCxKDFXQyVRUzcrPzNPw0BPz7JGtVpD6dGsVUo6Sh/mT9mqpBmtkqibU2Kgm1@kEg9kqCRqGRrE1mr@r@XiUlNJU9A10DMEMwwgpJ6BKZRhCKNhAkYwGiZgDKNhAiYwGiYAp2EMMxgNEzCH0TABCxgNE7CE0RABw/8A "PowerShell Core ‚Äì Try It Online")
Fixed the behaviour for negative values, thanks Ad√°m!
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `U`, 24 bytes
```
01?≈Ä¬¨‚à®:‚åê"‚ÇÄ*‚åà`«ê·∫è·∏≠‚âà‚â†·πô‚ÇÖ`¬Ω*‚àë
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJBVSIsIiIsIjAxP8WAwqziiKg64oyQXCLigoAq4oyIYMeQ4bqP4bit4omI4omg4bmZ4oKFYMK9KuKIkSIsIiIsIjBcbjAuMVxuMC4yXG4wLjNcbjAuNFxuMC41XG4wLjZcbjAuN1xuMC44XG4wLjlcbjFcbi0xXG4wLjMxIl0=)
Utf-8 emojis amiright
## [Vyxal](https://github.com/Vyxal/Vyxal), 16 bytes
```
01?≈Ä[‚ÇÄ*‚åä√ó*‚ÇÄ‚Ü≤|√ó‚ÇÄ*
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJBIiwiIiwiMDE/xYBb4oKAKuKMisOXKuKCgOKGsnzDl+KCgCoiLCIiLCIwXG4wLjFcbjAuMlxuMC4zXG4wLjRcbjAuNVxuMC42XG4wLjdcbjAuOFxuMC45XG4xXG4tMSJd)
Uses `*` for üîµ and  for ‚ö™, otherwise I'd have to score this in utf 8.
[Answer]
# [C# (.NET 7)](https://dotnet.microsoft.com/en-us/), 72 bytes
```
string a(double b,double c=0)=>c<.9?(b<0|b>c?"üîµ":"‚ö™")+a(b,c+.1):"";
```
[Try it here!](https://dotnetfiddle.net/CfVWS0)
```
string a(double b,double c=0) =>  //return
    c<.9                           //if counter is less than .9
    ?                             //then
        (                         //this "X"
            b<0|b>c               //if the percentage is less less than 0 or greater than the counter
            ?                     //then
                "üîµ"              //blue ball
            :                     //otherwise
                "‚ö™"              //white ball
        )                         //end "X"
        +                         //plus
        a(b,c+.1)                 //the result of calling the same function again with the counter increased by .1
    :                             //otherwise (counter is greater than or equal to 1)
        "";                       //return an empty string
```
[Answer]
# [Python](https://www.python.org), 55 bytes
-4 bytes thanks to `l4m2` and -15 bytes thanks to `Dominic van Essen`.
```
lambda n:(10-(b:=int(10-10*n)*(0<=n<1)))*'üîµ'+b*'‚ö™'
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vweI025ilpSVpuhY3zXMSc5NSEhXyrDQMDXQ1kqxsM_NKQExDA608TS0NAxvbPBtDTU1NLfUP86dsVddO0lJ_NGuVOlR7QVp-kUKBQmaegkaFvqGBgQKIXwHiFyXmpadqGOgoGBoYAglNTSsuBYWCIpDpaerVBbUKCtVpGgWateqaXFxwQ6J1DfWAWkyMYq24OLEqhti7YAGEBgA)
[Answer]
# JavaScript 62 60 57 bytes
## Update. 57 bytes
Slitly shorter version using `[...1e9+'']` to generate an array of 10 elements instead of [...Array(10)]
```
i=>[...1e9+''].map((_,b)=>i<0|b<i*10?'üîµ':'‚ö™').join``
```
```
f=i=>[...1e9+''].map((_,b)=>i<0|b<i*10?'üîµ':'‚ö™').join``
const testCases = [-2, 0, 0.01, 0.20, .666, 0.9, 0.99, 1, 10, NaN];
testCases.forEach(i => console.log(f(i), i))
```
```
.as-console {
  background-color: grey !important;
}
```
## Older version
Thank to @RydwolfPrograms for the `join` tip.
Non recursive solution.
```
    i=>[...Array(10)].map((_,b)=>i<0|b<i*10?'üîµ':'‚ö™').join``
```
This solution does not handle a NaN parameter.
[Answer]
# [APL(Dyalog Unicode)](https://dyalog.com), 37 bytes [SBCS](https://github.com/abrudz/SBCS)
Tacit function.
```
‚éïUCS 128309 9898/‚ç®10(‚ä¢,-)‚àò‚åà10√ó1‚åä|+0‚àò>
```
[Try it on APLgolf!](https://razetime.github.io/APLgolf/?h=AwA&c=e9Q3NdQ5WMHQyMLYwFLB0sLSQv9R7wpDA41HXYt0dDUfdcx41NNhaHB4uuGjnq4abQOggB0A&f=S1M4tN5Az5ArTcEAhCEsPUMIZQkhQRww1jMEAA&i=S1PQMzQFAA&r=tryapl&l=apl-dyalog&m=train&n=f)
`0‚àò>`‚ÄÉis argument negative? (0 or 1)
`|+`‚ÄÉadd that to the absolute value of the argument
`10√ó`‚ÄÉmultiply 10 by that
`10(`‚Ä¶`)‚àò‚åà`‚ÄÉround up and then, with 10 as left argument, apply the following function:
‚ÄÉ`-`‚ÄÉdifference between the arguments
‚ÄÉ`‚ä¢,`‚ÄÉprepend the left argument
`128309 9898/‚ç®`‚ÄÉuse those counts to replicate the code points
`‚éïUCS` ‚ÄÉconvert to characters
[Answer]
# [Pip](https://github.com/dloscutoff/pip), ~~33~~ 30 bytes
```
Y!@a?-:-a///tt'üîµXy.'‚ö™Xt-y
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724ILNgwYKlpSVpuhb7IhUdEu11rXQT9fX1S0rUP8yfsjWiUk_90axVESW6lRBFULUro5V0DfQMDJVioQIA)
### Explanation
I've replaced üîµ and ‚ö™ with `@` and `o` below so the columns will line up.
```
Y!@a?-:-a///tt'@Xy.'oXt-y
   a                      ; Command-line argument
  @                       ; Get the first character
 !                        ; Negate (truthy for 0, falsey for anything else)
    ?                     ; If that is truthy (which means 0.0 <= a < 1.0):
       -a                 ;  Negate a
         //               ;  Int-divide (rounding down) by
           /t             ;  1/10
                          ;  (i.e. multiply by 10 and round down)
     -:                   ;  Negate the result
                          ; Else:
             t            ;  10
Y                         ; Yank that value into y
              '@Xy        ; String of y copies of @ character
                   'oXt-y ; String of 10-y copies of o character
                  .       ; Concatenate the two strings
```
[Answer]
# [Factor](https://factorcode.org/), 56 bytes
```
[| x | 10 iota [ x 10 * < x 0 < or 128309 9898 ? ] map ]
```
[Try it online!](https://tio.run/##NVDBToQwEL3zFS8kezGhaQsVqkaPxosX4wn3QLC4ZFmK0E00rt@OryRO5r15M5m20@maNvh5fX15en68wTS7EL6nuR8DFvd5dmPrFpyacMDRzaMb0PmZaejHDwy@bYYFt0nyg8wUQuYGmRQkoaKQCiT8C7sRjTEWlIy2qY0Kq0tDoSOiyHOI3EIUdANhiGuiLCEqlqMbKL6geJ8RJbTUWnCI32StL/jCBUqi96FBzYz6CncUkuxnKF3lHMpWtsID9vzlhP1a4/3MGDcx@cXxZJoO/dEh3dkzkN0Du@VtTLEtqWNn609bp2vaw/oH "Factor ‚Äì Try It Online")
```
[| x |              ! a quotation taking an argument x
  10 iota           ! the range [0..9]
  [                 ! start map quotation
    x 10 * <        ! is the range number less than x times ten?
    x 0 < or        ! or is x less than zero?
    128309 9898 ?   ! 128309 if so; 9898 if not
  ] map             ! map each number in the range to something
]                   ! end quotation
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 19 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
‚Ä¢
#*Œì‚Ä¢6√¥√ß9√ùT/I@Id*√®
```
Output as a list of characters, since [strings are basically sequences of characters](https://codegolf.meta.stackexchange.com/questions/2214/whats-a-string). But since the challenge does ask to mimic the output *exactly*, a trailing `J`oin could be added for +1 byte.
[Try it online](https://tio.run/##yy9OTMpM/f//UcMiLmWtc5OBtNnhLYeXWx6eG6Lv6eCZonV4xX@v/wZ6xoYA) or [verify all test cases](https://tio.run/##Pc4hDsIwFMZxDacgxS2v8F63dasaGo0jCAgI1AQJSR2KA4DGYOAA3KCeQ@wipV8F4v/aXyr6@tN2dzzEs@/UZLjeRqqLw@U5nhbfezpt@ISXC4/V3C/8vgjvuKS41sLMpCtDWkjzzGHkGwspzYqY8j0NR3hK5QEZBBmoRFAJVeivGkE1ZBFkoQZBDdQiqIVykHMkJOl/YUrbYu3NDw).
**Explanation:**
```
‚Ä¢\n#*Œì‚Ä¢    # Push compressed integer 1283099898
       6√¥  # Split it into parts of size 6: [128309,9898]
         √ß # Convert both to a character with this codepoint: ["üîµ","‚ö™"]
9√ù         # Push list [0,1,2,3,4,5,6,7,8,9]
  T/       # Divide each by 10: [0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9]
I@         # Check for each value in the list whether it's >= the input
  I        # Push the input-decimal again
   d       # Check that it's non-negative (1 if >=0; 0 if <0)
    *      # Multiply that to each check, so negative inputs will become a list of 0s
     √®     # 0-based index each 0 or 1 into the pair of unicode characters
           # (after which the list of characters is output implicitly as result)
```
[See this 05AB1E tip of mine (section *How to compress large integers?*)](https://codegolf.stackexchange.com/a/166851/52210) to understand why `‚Ä¢\n#*Œì‚Ä¢` is `1283099898`.
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 69 bytes
```
void a(double b){for(int c=0;c<10;)Write(b<0|b*10>c++?"üîµ":"‚ö™");}
```
[Try it online!](https://tio.run/##Sy7WTS7O/P@/LD8zRSFRIyW/NCknVSFJszotv0gjM69EIdnWwDrZxtDAWjO8KLMkVSPJxqAmScvQwC5ZW9te6cP8KVuVrJQezVqlpGld@z9Rw0DPQNOaC6zUJzMvVQPIAQsaGBhiEzc0NjbHJm5kZolN2NjYGFNYF2jyfwA "C# (Visual C# Interactive Compiler) ‚Äì Try It Online")
**Iterative Solution**
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 71 bytes
```
string a(double b,int c=0)=>c<10?(b<0|b*10>c?"üîµ":"‚ö™")+a(b,++c):"";
```
[Try it online!](https://tio.run/##Sy7WTS7O/P@/uKQoMy9dIVEjJb80KSdVIUknM69EIdnWQNPWLtnG0MBeI8nGoCZJy9DALtle6cP8KVuVrJQezVqlpKmdqJGko62drGmlpGT9P7wosyTVJzMvVSNRw0DPQFPTmgtNyMDAEFPU0NjYHFPUyMwSU9DY2BhdUBdk4n8A "C# (Visual C# Interactive Compiler) ‚Äì Try It Online")
**Recursive Solution**
[Answer]
# [Swift](https://developer.apple.com/swift/), 70 84 bytes
-2 bytes thanks to @hatcyl suggestion
```
var f={i in(0...9).map{i<0||i>Float($0)/10 ?"üîµ":"‚ö™Ô∏è"}.joined()}
```
[Try it online!](https://tio.run/##Ky7PTCsx@f@/LLFIIc22OlMhM0/DQE9Pz1JTLzexoDrTxqCmJtPOLSc/sURDxUBT39BAwV7pw/wpW5WslB7NWvV@R79SrV5WfmZeaoqGZu3/gqLMvBKNNA1dI01NLhjHQM8EhWdmgcK1tETiGuoZGBoZAwX@AwA "Swift ‚Äì Try It Online")
[Answer]
# [Perl](https://www.perl.org/), ~~52~~ 54 bytes
**Edit** : Change condition with >=&<= to handle NaN + add note
```
sub k($c){join'',map$c>=0&$c<=$_/10?"‚ö™":"üîµ",0..9}
```
[Try it online!](https://tio.run/##K0gtyjH9X1qcqpCWmlhSWpSqoF6cWKlu/b@4NEkhW0MlWbM6Kz8zT11dJzexQCXZztZATSXZxlYlXt/QwF7p0axVSlZKH@ZP2aqkY6CnZ1n7H6hZI1tD10hT05oLwjbQM0HmmFkg8ywtETy/RD8Q5/@//IKSzPy84v@6vjA3FWem54FZxQA "Perl 5 ‚Äì Try It Online")
#### Note
It is possible to remove the join part, because Perl default behavior when you print an array is to join it, but it feel cheaty. What you guys think ?
##### Perl Cheaty version - 47 Bytes
```
sub k($c){map$c>=0&$c<=$_/10?"‚ö™":"üîµ",0..9}
```
[Try it online!](https://tio.run/##K0gtyjH9X1qcqpCWmlhSWpSqoF6cWKlu/b@4NEkhW0MlWbM6N7FAJdnO1kBNJdnGViVe39DAXunRrFVKVkof5k/ZqqRjoKdnWfsfqEsjW0PXSFPTmgvCNtAzQeaYWSDzLC0RPL9EPxDn/7/8gpLM/Lzi/7q@MMcUZ6bngVnFAA "Perl 5 ‚Äì Try It Online")
It uses "signatures 15 years beta" feature (activable via commande line -Mfeature=signature) or via import. The old school perl take 2 bytes more :
```
sub j{join'',map@_[0]<0|@_[0]>$_/10?"üîµ":"‚ö™",0..9}
```
#### Explaination :
```
sub j{
  join ('', # Join each element of a list with the string ''. 
      map( # Return a list of what the block return for each element of the list passed in second argument
          {@_[0]<0|@_[0]>$_/10?"üîµ":"‚ö™"} , #@_[0] is the function first parameter, $_ the current iterated element
          (0..9)) # Simple list
}
```
### Other interesting solution :
### The substr 61|59(signatures) Bytes,
probably fastest and lightest solution, (OK NaN)
```
sub b{substr'üîµ'x(10).'‚ö™'x(10-(@_[0]<0?10:@_[0]*10)),-10}
sub p($c){substr'üîµ'x(10).'‚ö™'x(10-($c<0?10:$c*10)),-10}
```
### The for loop 55|57 Bytes
Work only once, dunno if it can be improve without too many bytes (KO NaN):
```
sub l($c){$a.=($c<0|$c>$_/10?"üîµ":"‚ö™")for 0..9;$a}
```
### Recursive 81|62 Bytes
Not very interesting at first, juste a copy cat of JS. But i run into a small bug on the "old perl" version (KO NaN):
```
sub a{(@_[1]//=10)?a(@_[0],@_[1]-1).(@_[0]<0|@_[0]>(@_[1]-1)/10?"üîµ":"‚ö™"):''}
sub t($n,$i=10){$i?t($n,--$i).($n<0|$n>$i/10?"üîµ":"‚ö™"):''}
```
I expected this to work :
```
sub z{(@_[1]//=10)?z(@_[0],--@_[1]).(@_[0]<0|@_[0]>(@_[1])/10?"üîµ":"‚ö™"):''}
```
But it does not. --@\_[1](https://www.perl.org/) do not work and i dont understand why.
[Answer]
# [Julia 0.6](http://julialang.org/), 49 bytes
```
~x=rpad("üîµ"^ceil(Int,10(0<=x<1?x:1)),20,"‚ö™")
```
[Try it online!](https://tio.run/##yyrNyUw0@/@/rsK2qCAxRUPpw/wpW5XiklMzczQ880p0DA00DGxsK2wM7SusDDU1dYwMdJQezVqlpPmfS1nBrTQnR6EoMS89lSs3sUAjU9euoCgzryQnT6MuU1NH10DP0AqEDfUMNa25uGBymlxArc4ZqcnZCkX5pXkpmXnpCmn5RQqpKempCsmJxanF2EyLNtAz0FEAEkBgCGZYWlqCaMNYTev/AA "Julia 0.6 ‚Äì Try It Online")
If the input `x` falls outside the range [0,1), it's replaced with `1`. The value ‚åà10x‚åâ determines the number of `"üîµ"`, and the output is padded to length with `"‚ö™"`.
Using the [ternary operator](https://docs.julialang.org/en/v1/manual/control-flow/) without spaces is deprecated in Julia 0.7 and disabled in Julia 1.0. The padding length passed to `rpad` has to be adjusted for Julia 0.6, probably because `textwidth` was added in Julia 0.7.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 19 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
>‚Åµ·∏∂√∑¬§¬ª‚ÅªA$·ªã‚Äú¬¢‚Ç¨:‚Äú&∆ì‚Äô·ªå
```
A monadic Link that accepts a double precision floating point number and yields a list of characters.
**[Try it online!](https://tio.run/##ATgAx/9qZWxsef//PuKBteG4tsO3wqTCu@KBu0Ek4buL4oCcwqLigqw64oCcJsaT4oCZ4buM////MC40MQ "Jelly ‚Äì Try It Online")** Or see the [test-suite](https://tio.run/##y0rNyan8/9/uUePWhzu2Hd5@aMmh3Y8adzuqPNzd/ahhzqFFj5rWWAEZascmP2qY@XB3z/@jexwOtwNFvYE48v//aN3MvDQdBV0jAwMdIAHEQI4hEBvomYJYqbrGRsY6CgY6CnCmnoEpiDQEEWCWBZgwQAFGIDFLMAEkgWoN9QyAJFAYaIkCyDYFsMV5iXmxAA "Jelly ‚Äì Try It Online").
### How?
```
>‚Åµ·∏∂√∑¬§¬ª‚ÅªA$·ªã‚Äú¬¢‚Ç¨:‚Äú&∆ì‚Äô·ªå - Link: double D
    ¬§               - nilad followed by link(s) as a nilad:
 ‚Åµ                  -   ten
  ·∏∂                 -   lowered range -> [0, 1, 2, ..., 9]
   √∑                -   divided by (ten) -> [0, 0,1, 0.2, ..., 0.9]
>                   - (D) greater than (that) (vectorised) -> G
        $           - last two links as a monad - f(D):
       A            -   absolute value (D)
      ‚Åª             -   (D) not equal to (that)? -> K   (K = (x<0 or x is nan)?)
     ¬ª              - (G) maximum (K) (vectorised)
                       -> L = list with 1 at blue and 0 at white
          ‚Äú¬¢‚Ç¨:‚Äú&∆ì‚Äô  - list of base 250 compressed numbers = [128309, 9898]
         ·ªã          - (L) index into (that) (vectorised)
                  ·ªå - cast to characters
```
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 67 bytes
```
^[^0]|^0.9.
10$*@
T`_d`d`....
\d(..)?
$1$*@10$*‚ö™
1M!`.{10}
@
üîµ
```
[Try it online!](https://tio.run/##JY4tDgIxEIX9uwXJkiwkO5nhfxXrUDgcUErSFRgEwQG3QGHweC7ECbhB6StNvtcvM@LNqT0fjvvYLRc@urXT7dWp1ALTot9g5XfBBy/pYRNKkd4chaUN15/HC7bseLmY3tDg@7y/Y6xMzMBkKBOV5plKjjRT/D/JMAaEMiSUEaGMCWVCKFNCmRFKTQypELmU9TzkBw "Retina 0.8.2 ‚Äì Try It Online") Link includes test cases. Explanation:
```
^[^0]|^0.9.
10$*@
```
Unless the input is from `0` to `0.9` inclusive, put 10 `@`s at the start. (I use `@` as it's a single UTF-16 character and `üîµ` isn't.)
```
T`_d`d`....
```
Increment the digits if there are at least three (not including the decimal point) i.e. leave `0`, `0.1` ... `0.9`.
```
\d(..)?.*
$1$*@10$*‚ö™
```
Convert the number of tenths (if any) into `@`s and also add 10 `‚ö™`s.
```
1M!`.{10}
```
Keep just the first 10 characters. This removes any surplus `‚ö™`s and also spurious `@`s or `‚ö™` arising from later digits.
```
@
üîµ
```
Turn `@`s into `üîµ`s.
[Answer]
# [Arturo](https://arturo-lang.io), 54 bytes
```
$[x][join map 0..9'n[(or? n<x*10x<0)?->"üîµ"->"‚ö™"]]
```
[Try it](http://arturo-lang.io/playground?QrcLJW)
```
$[x][                 ; a function taking an argument x
  join                ; join a block of strings into a string
  map 0..9'n[         ; map over 0..9 and assign current element to n
    (or? n<x*10x<0)?  ; is n<x*10 or x<0?
    ->"üîµ"            ; blue orb if so
    ->"‚ö™"            ; white orb if not
  ]                   ; end map
]                     ; end function
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/) with `-lm`, ~~86~~ 85 Unicode characters (~~91~~ 90 bytes)
* -1 thanks to ceilingcat
Converts the value to an integer to avoid floating-point rounding issues. Although `float` would be sufficient for this task, the original specified a `double`, so I used that type instead.
```
b,c;f(double a){for(b=c=fmin(a<0?:a,1)*10;b--;)printf("üîµ");for(;c++<10;)printf("‚ö™");}
```
[Try it online!](https://tio.run/##PYw7DsIwEET7nGJlCcnGceQg0eAYzrJ2cBQpP@VDE@UWVDT09FyIE3ACjFNAMzujtzNWFNZ6b2KrHM3byVRnQDa7tqdGW@3qsqGYydMB45RtU6mMEIp1fdmMjpL3/fokTK3fynKeBf5nr9sjoMWHBDWGmUtb5gzmCMBVLY6AKlp96KIWqQLMdsl6uJaJ3MfQTeNACWGhA7/RDXegj0BiZAocXXWJFv@xrsJi8KKqvw "C (gcc) ‚Äì Try It Online")
[Answer]
# JavaScript, 68 bytes
Without recursion:
```
(p,i=0)=>'‚ö™'.repeat(10).replace(/‚ö™/g,e=>p>=0&i++>=p*10?e:'üîµ')
```
Try it:
```
f=(p,i=0)=>'‚ö™'.repeat(10).replace(/‚ö™/g,e=>p>=0&i++>=p*10?e:'üîµ')
console.log(f(-2));
console.log(f(0));
console.log(f(1));
console.log(f(2));
console.log(f(0.1));
console.log(f(0.4));
console.log(f(0.68));
console.log(f(0.9));
console.log(f(0.99));
console.log(f(NaN));
```
```
.as-console {
  background-color: grey !important;
}
```
## UPD 96 -> 86
Thanks to [mousetail](https://codegolf.stackexchange.com/users/91213/mousetail) for the [tip](https://codegolf.stackexchange.com/questions/256890/shortest-digid-app-getpercentagerounds-function/257060?noredirect=1#comment568580_257060) to reduce bytes count
## UPD 86 -> 70
Thanks to [Dominic van Essen](https://codegolf.stackexchange.com/users/95126/dominic-van-essen) for the [tip](https://codegolf.stackexchange.com/questions/256890/shortest-digid-app-getpercentagerounds-function/257060?noredirect=1#comment568583_257060) to reduce bytes count
## UPD 70 -> 68
Thanks to [Rydwolf Programs](https://codegolf.stackexchange.com/users/79857/rydwolf-programs) for the [tip](https://codegolf.stackexchange.com/questions/256890/shortest-digid-app-getpercentagerounds-function/257060?noredirect=1#comment568588_257060) to reduce bytes count
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-P`](https://codegolf.meta.stackexchange.com/a/14339/), 22 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
A√á¬®A*U¬©√é√å?9898d:# 309d
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVA&code=QceoQSpVqc7MPzk4OThkOiOAMzA5ZA&input=LTAuMQ)
```
A√á¬®A*U¬©√é√å?9898d:# 309d     :Implicit input of float U
A                          :10
 √á                         :Map the range [0,A)
  ¬®A*U                     :  Is greater than or equal to A*U
      ¬©                    :  Logical AND with
       √é                   :    Sign of U
        √å                  :    Sign of difference with -1
         ?                 :  If true
          9898d            :    Character at codepoint 9898
               :           :  Else
                # 309d     :    Character at codepoint 128309
                           :Implicitly join and output
```
[Answer]
# [Scala](https://www.scala-lang.org/), ~~81~~ 78 bytes
saved 3 bytes thanks to comment.
[Try it online!](https://tio.run/##K05OzEn8n5@UlZpcouCbmJmnUP0/JTVNIU2jwMolvzQpJ1XTKrikKDMv3VbDQKEkX8FSUy83sUAj09YuE6jGxqCmwC5TS89QU@nD/ClblVJzilOVHs1apQRUlQ3R919BAWRgLtBsjcSi9GIrBceiosTKaIhsrKaVQmheZomCrUI1lwIQFABFS3LyNNI0dA0N9Aw0NYFi@voKqRUFQBempihYKYAsIgajGwc0zZB6xsHchm4c0PN4EKYhON1EiimGWJ1CsilQY7CHD9HGmOJ0DDomZJIl0SZhMRnTNLzeIzH6DXFEP7nGwZMT2cbVctX@BwA)
```
def f(p:Double):String=(0 to 9).map(i=>if(p<0|p>i*.1)"üîµ"else"‚ö™").mkString
```
Ungolfed version
```
object Main {
   def f(p: Double): String =
    (0 to 9).map(i => if (p < 0 || p > i * 0.1) "üîµ" else "‚ö™").mkString
   def main(args: Array[String]): Unit = {
    println(f(-10.0))   // expected : üîµüîµüîµüîµüîµüîµüîµüîµüîµüîµ
    println(f(-0.01))   // expected : üîµüîµüîµüîµüîµüîµüîµüîµüîµüîµ
    println(f(0.0))     // expected : ‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™
    println(f(0.001))   // expected : üîµ‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™
    println(f(0.1))     // expected : üîµ‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™
    println(f(0.11))    // expected : üîµüîµ‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™‚ö™
    println(f(0.5))     // expected : üîµüîµüîµüîµüîµ‚ö™‚ö™‚ö™‚ö™‚ö™
    println(f(0.9))     // expected : üîµüîµüîµüîµüîµüîµüîµüîµüîµ‚ö™
    println(f(0.91))    // expected : üîµüîµüîµüîµüîµüîµüîµüîµüîµüîµ
    println(f(1.0))     // expected : üîµüîµüîµüîµüîµüîµüîµüîµüîµüîµ
    println(f(10.0))    // expected : üîµüîµüîµüîµüîµüîµüîµüîµüîµüîµ
  }
}
```
[Answer]
# [jq](https://stedolan.github.io/jq/), 32 bytes
```
.*10|["üîµ"*.,"‚ö™"*(10-.)]|add
```
[Try it online!](https://tio.run/##yyr8/19Py9CgJlrpw/wpW5W09HSUHs1apaSlYWigq6cZW5OYkvL/v4Ge@X9d3aLEct380pKC0hIA "jq ‚Äì Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 21 bytes
```
ÔºÆŒ∏‚≠Üœá¬ß‚ö™üîµ‚ÄπŒπ√óœá‚à®‚ÄπŒ∏‚Å∞Œ∏
```
[Try it online!](https://tio.run/##S85ILErOT8z5/98zr6C0xK80Nym1SKNQ05oroCgzr0QjuARIpfsmFmgYGugoOJZ45qWkVmgoPZq16sP8KVuVdBR8UouLNTJ1FEIyc1OLwYr8izTAgoU6CgaaOgqFmmBg/f@/gZ6Z5X/dshwA "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Explanation:
```
ÔºÆŒ∏                  First input as a number
   œá                Predefined variable 10
  ‚≠Ü                 Map over implicit range and join
     ‚ö™üîµ             Literal string `‚ö™üîµ`
    ¬ß               Indexed by
        Œπ           Current value
       ‚Äπ            Is less than
          œá         Predefined variable 10
         √ó          Multiplied by
             Œ∏      Input number
            ‚Äπ       Is less than
              ‚Å∞     Literal integer `0`
           ‚à®        Logical Or
               Œ∏    Input number
                    Implicitly print
```
Although `‚ö™` and `üîµ` are not in Charcoal's code page it can still represent them using special byte sequences which take 3 and 4 bytes respectively as you can see in its `xxd`-style dump: [Try it online!](https://tio.run/##S85ILErOT8z5/98zr6C0xK80Nym1SKNQ05oroCgzr0QjuARIpfsmFmgYGugoOJZ45qWkVmgoPZq16sP8KVuVdBR8UouLNTJ1FEIyc1OLwYr8izTAgoU6CgaaOgqFmmBg/f//f92ynAoA "Charcoal ‚Äì Try It Online")
]