If Number is instantiated and String is a variable, String is bound to the textual representation of the number as writeq/1 would produce it.
If String does not represent a number, then number_string/2 fails.
Success: number_string(1989,X). (gives X = "1989"). number_string(-7,X). (gives X = "-7"). number_string(124.5,X). (gives X = "124.5"). number_string(X,"+12"). (gives X = 12). number_string(X,"-7"). (gives X = -7). number_string(N,"123.4"). (gives N = 123.4). number_string(3.0,"3.0"). number_string(3.0,"+3.00"). Fail: number_string(N,"- 15"). number_string(N," +15"). number_string(N,"2 "). number_string(N,".5"). number_string(N,"Abcd"). number_string(222,"123"). Error: number_string(N,S). (Error 4). number_string(a,"12"). (Error 5). number_string(N,1234). (Error 5).